Update a contact

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.

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"
    }
  ]
}'

Update contact's attributes

In this example, we're updating a contact providing attributes. To know more about attributes, please refer to this documentation.

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"
  }
}'

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.

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"]
}'

Update contact's details

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

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"
    }
  ]
}'

Last updated