> For the complete documentation index, see [llms.txt](https://docs.bird.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bird.com/api/contacts-api/api-reference/manage-workspace-contacts/update-a-contact.md).

# Update a contact

{% openapi src="<https://global--openapi-specs--151603429280--use1.s3.us-east-1.amazonaws.com/joined-specs/openapi.yml>" path="/workspaces/{workspaceId}/contacts/{contactId}" method="patch" %}
<https://global--openapi-specs--151603429280--use1.s3.us-east-1.amazonaws.com/joined-specs/openapi.yml>
{% endopenapi %}

## Examples

Let's establish some of our data that will be used in the following examples:

* **Workspace ID**: a1405560-c8d3-4b1a-877d-3f449ad95352
* **AccessKey:** abcd
* **Contact ID**: 12bd0e40-9361-4e32-8b26-99b4ab7eae09

### Update contact's identifiers

In this example, we're updating a contact providing identifiers. To know more about identifiers, please refer to [this documentation](/api/contacts-api/api-reference/manage-contact-identifiers.md).

{% tabs %}
{% tab title="Request" %}

```bash
curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/contacts/12bd0e40-9361-4e32-8b26-99b4ab7eae09" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "addIdentifiers": [
    {
      "key": "emailaddress",
      "value": "contacts@example.com"
    }
  ]
}'
```

{% endtab %}

{% tab title="Response (200 OK)" %}

```json
{
  "id": "12bd0e40-9361-4e32-8b26-99b4ab7eae09",
  "computedDisplayName": "John",
  "featuredIdentifiers": [
    {
      "key": "emailaddress",
      "value": "contacts@example.com"
    }
  ],
  "identifierCount": 1,
  "attributes": {
    "firstName": "John",
    "initialReference": "32d6f4f9-7e9c-4271-bd83-9d6976808f2f",
    "lastName": "Doe",
    "timezone": "America/Sao_Paulo"
  },
  "createdAt": "2024-11-26T15:00:00.000Z",
  "updatedAt": "2024-11-26T15:00:00.000Z"
}
```

{% endtab %}
{% endtabs %}

### Update contact's attributes

In this example, we're updating a contact providing attributes. To know more about attributes, please refer to [this documentation](/api/contacts-api/api-reference/manage-contact-attribute-definition.md).

{% tabs %}
{% tab title="Request" %}

```bash
curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/contacts/12bd0e40-9361-4e32-8b26-99b4ab7eae09" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "attributes": {
    "countryCode": "US"
  }
}'
```

{% endtab %}

{% tab title="Response (200 OK)" %}

```json
{
  "id": "12bd0e40-9361-4e32-8b26-99b4ab7eae09",
  "computedDisplayName": "John",
  "featuredIdentifiers": [
    {
      "key": "emailaddress",
      "value": "contacts@example.com"
    }
  ],
  "identifierCount": 1,
  "attributes": {
    "firstName": "John",
    "initialReference": "32d6f4f9-7e9c-4271-bd83-9d6976808f2f",
    "lastName": "Doe",
    "timezone": "America/Sao_Paulo",
    "countryCode": "US"
  },
  "createdAt": "2024-11-26T15:00:00.000Z",
  "updatedAt": "2024-11-26T15:00:00.000Z"
}
```

{% endtab %}
{% endtabs %}

### Update contact's lists

In this example, we're updating a contact providing list IDs. To knoe more about lists, please refer to [this documentation](/api/contacts-api/api-reference/manage-contact-lists.md).

{% tabs %}
{% tab title="Request" %}

```bash
curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/contacts/12bd0e40-9361-4e32-8b26-99b4ab7eae09" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "addToLists": ["12bd0e40-9361-4e32-8b26-99b4ab7eae09"]
}'
```

{% endtab %}

{% tab title="Response (200 OK)" %}

```json
{
  "id": "12bd0e40-9361-4e32-8b26-99b4ab7eae09",
  "computedDisplayName": "John",
  "featuredIdentifiers": [
    {
      "key": "emailaddress",
      "value": "contacts@bird.com"
    }
  ],
  "identifierCount": 1,
  "attributes": {
    "firstName": "John",
    "initialReference": "32d6f4f9-7e9c-4271-bd83-9d6976808f2f",
    "lastName": "Doe",
    "timezone": "America/Sao_Paulo"
  },
  "listIds":["12bd0e40-9361-4e32-8b26-99b4ab7eae09"],
  "createdAt": "2024-11-26T15:00:00.000Z",
  "updatedAt": "2024-11-26T15:00:00.000Z"
}
```

{% endtab %}
{% endtabs %}

### Update contact's details

In this example, we're creating a contact providing all the examples above.

{% tabs %}
{% tab title="Request" %}

```bash
curl -X PATCH "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/contacts/12bd0e40-9361-4e32-8b26-99b4ab7eae09" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "addToLists": [
    "12bd0e40-9361-4e32-8b26-99b4ab7eae09"
  ],
  "attributes": {
    "countryCode": "US"
  },
  "addIdentifiers": [
    {
      "key": "emailaddress",
      "value": "contacts@bird.com"
    }
  ]
}'
```

{% endtab %}

{% tab title="Response (200 OK)" %}

```json
{
  "id": "12bd0e40-9361-4e32-8b26-99b4ab7eae09",
  "computedDisplayName": "John",
  "featuredIdentifiers": [
    {
      "key": "emailaddress",
      "value": "contacts@bird.com"
    }
  ],
  "identifierCount": 1,
  "attributes": {
    "firstName": "John",
    "initialReference": "32d6f4f9-7e9c-4271-bd83-9d6976808f2f",
    "lastName": "Doe",
    "timezone": "America/Sao_Paulo",
    "countryCode": "US"
  },
  "listIds":["12bd0e40-9361-4e32-8b26-99b4ab7eae09"],
  "createdAt": "2024-11-26T15:00:00.000Z",
  "updatedAt": "2024-11-26T15:00:00.000Z"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/contacts-api/api-reference/manage-workspace-contacts/update-a-contact.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
