Update contact
Set contact properties and add or remove tags on a contact.
PATCH https://cotlet.dev/api/v1/tidio/contacts/{contact_id}
write
Sets the contact properties you pass by name and leaves the others. The property must already exist in Settings > Fields, and the agent cannot create one with it. It sends nothing to the contact, and a wrong value is undone by calling it again, so it needs no confirmation by default. It returns the contact after the change.
Parameters
| Name | Type | Description |
|---|---|---|
| contact_id string required | string | Contact ID from list_contacts. |
| properties object | object | Property names and their new values. |
| add_tags string[] | string[] | Customer tags to add. |
| remove_tags string[] | string[] | Customer tags to remove. |
Request
curl -X PATCH https://cotlet.dev/api/v1/tidio/contacts/c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13 \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"properties":{"plan":"customer"},"add_tags":["vip"]}' result = client.call("tidio", "update_contact", {"contact_id":"c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13","properties":{"plan":"customer"},"add_tags":["vip"]}) const result = await cotlet.call('tidio', 'update_contact', {"contact_id":"c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13","properties":{"plan":"customer"},"add_tags":["vip"]}); cotlet call tidio update_contact --data '{"contact_id":"c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13","properties":{"plan":"customer"},"add_tags":["vip"]}' Example response
{
"contact_id": "c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13",
"properties": {
"plan": "customer"
},
"tags": [
"vip"
]
}