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

Parameters: update_contact
NameTypeDescription
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
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"]}'
Python
result = client.call("tidio", "update_contact", {"contact_id":"c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13","properties":{"plan":"customer"},"add_tags":["vip"]})
Node.js
const result = await cotlet.call('tidio', 'update_contact', {"contact_id":"c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13","properties":{"plan":"customer"},"add_tags":["vip"]});
CLI
cotlet call tidio update_contact --data '{"contact_id":"c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13","properties":{"plan":"customer"},"add_tags":["vip"]}'

Example response

JSON

{
  "contact_id": "c4d9e1a2-77b0-4e0f-9a31-5b2c8e6f0d13",
  "properties": {
    "plan": "customer"
  },
  "tags": [
    "vip"
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.