> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shilo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Contact — Shilo API Reference

> Update contact profile fields including name, phone, emails, stage, source, and tags. Use Shilo UUID or external_contact_id to identify the contact.

Use this endpoint to update the profile fields of an existing contact. All body fields are optional — only the fields you include will be modified, leaving the rest unchanged. You can identify the contact by their Shilo UUID or by your external contact ID. This endpoint requires a **write-enabled** API key.

## Endpoint

```
PUT https://api.shilo.ai/api/v1/contacts/{identifier}
```

## Authentication

Include your write-enabled API key in the request header:

```
x-api-key: YOUR_API_KEY
```

## Path Parameters

<ParamField path="identifier" type="string" required>
  The identifier used to look up the contact. Three formats are supported:

  | Format              | Example                                   |
  | ------------------- | ----------------------------------------- |
  | Plain Shilo UUID    | `ee6f2136-b94a-4438-9335-3acf5b2a0d31`    |
  | Prefixed Shilo UUID | `id:ee6f2136-b94a-4438-9335-3acf5b2a0d31` |
  | External contact ID | `external_contact_id:4534`                |
</ParamField>

## Request Body

All fields are optional. Submit only the fields you want to update.

<ParamField body="name" type="string">
  Updated full display name for the contact.
</ParamField>

<ParamField body="first_name" type="string">
  Updated first name.
</ParamField>

<ParamField body="last_name" type="string">
  Updated last name.
</ParamField>

<ParamField body="phone" type="string">
  Updated primary phone number. Any standard formatting is accepted.
</ParamField>

<ParamField body="emails" type="string[]">
  Updated list of email addresses. This replaces the existing emails array in full.
</ParamField>

<ParamField body="stage" type="string">
  Updated human-readable pipeline stage label.
</ParamField>

<ParamField body="stage_id" type="string">
  Updated pipeline stage ID from your system.
</ParamField>

<ParamField body="source" type="string">
  Updated human-readable lead source label.
</ParamField>

<ParamField body="source_id" type="string">
  Updated lead source ID from your system.
</ParamField>

<ParamField body="tags" type="string[]">
  Updated list of tags. This replaces the existing tags array in full.
</ParamField>

## Response

A successful request returns HTTP `200` with the full updated Contact object.

### Response Fields

<ResponseField name="id" type="string">
  The Shilo-assigned UUID for this contact.
</ResponseField>

<ResponseField name="external_contact_id" type="string">
  The contact ID from your external CRM or system of record.
</ResponseField>

<ResponseField name="name" type="string">
  Full display name of the contact.
</ResponseField>

<ResponseField name="first_name" type="string">
  Contact's first name.
</ResponseField>

<ResponseField name="last_name" type="string">
  Contact's last name.
</ResponseField>

<ResponseField name="phone" type="string">
  Primary phone number.
</ResponseField>

<ResponseField name="emails" type="array of strings">
  Email addresses associated with the contact.
</ResponseField>

<ResponseField name="stage" type="string">
  Current pipeline stage label.
</ResponseField>

<ResponseField name="stage_id" type="string">
  Pipeline stage ID from your system.
</ResponseField>

<ResponseField name="source" type="string">
  Lead source label.
</ResponseField>

<ResponseField name="source_id" type="string">
  Lead source ID from your system.
</ResponseField>

<ResponseField name="tags" type="array of strings">
  Tags applied to the contact.
</ResponseField>

<ResponseField name="created_date" type="string">
  ISO-8601 timestamp indicating when this contact was created in Shilo.
</ResponseField>

### Example Response

```json theme={null}
{
  "id": "ee6f2136-b94a-4438-9335-3acf5b2a0d31",
  "external_contact_id": "4534",
  "name": "Jamie Customer",
  "first_name": "Jamie",
  "last_name": "Customer",
  "phone": "(555) 555-0000",
  "emails": ["jamie.new@example.com"],
  "stage": "Closed Won",
  "stage_id": "stage-12",
  "source": "Zillow",
  "source_id": "src-7",
  "tags": ["closed", "q4"],
  "created_date": "2024-09-01T10:00:00Z"
}
```

## Error Codes

| Status | Meaning                                                     |
| ------ | ----------------------------------------------------------- |
| `400`  | Invalid request body or malformed identifier.               |
| `403`  | Your API key is read-only. A write-enabled key is required. |

## Example Request

```bash theme={null}
curl -X PUT "https://api.shilo.ai/api/v1/contacts/external_contact_id:4534" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "(555) 555-0000",
    "emails": ["jamie.new@example.com"],
    "stage": "Closed Won",
    "stage_id": "stage-12",
    "tags": ["closed", "q4"]
  }'
```
