Update a contact
PATCH/v1/chatbots/{chatbotId}/contacts/{contactId}
Change the name, email, phone or custom attributes of a contact with the legacy v1 API by sending only the fields that changed.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Updates one contact. Call it when your CRM changes, for example when a customer upgrades a plan and the agent should know about it.
Request
PATCH /v1/chatbots/{chatbotId}/contacts/{contactId}
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
chatbotId |
string | Yes | The ID of the chatbot, starting with agt_. |
contactId |
string | Yes | The ID of the contact, starting with con_. |
Body fields. Send only the ones you want to change:
| Name | Type | Required | Description |
|---|---|---|---|
name |
string | No | New full name. |
email |
string | No | New email address. |
phone |
string | No | New phone number in international format. |
attributes |
object | No | Custom attribute values to set. They merge into the existing values. Set a key to null to clear it. |
Attributes you leave out stay as they are. Every key must exist in the schema, see Get custom attributes schema.
Example request
curl -X PATCH https://api.askocto.co/v1/chatbots/agt_8f3k2m/contacts/con_4d7h2q \
-H "Authorization: Bearer $OCTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"attributes": { "plan": "business" }
}'
const response = await fetch(
"https://api.askocto.co/v1/chatbots/agt_8f3k2m/contacts/con_4d7h2q",
{
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.OCTO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ attributes: { plan: "business" } }),
},
)
console.log(await response.json())
Example response
A successful call returns 200 OK with the updated contact.
{
"id": "con_4d7h2q",
"chatbotId": "agt_8f3k2m",
"name": "Maya Jensen",
"email": "maya@example.com",
"phone": "+15555550123",
"attributes": {
"plan": "business",
"company": "Harbor Outfitters"
},
"createdAt": "2026-03-14T09:30:00Z",
"updatedAt": "2026-03-21T08:15:00Z"
}
Response fields
The response is the full contact object, the same as in Get a specific contact. The attributes object shows the values after the merge, and updatedAt moves to the time of this change.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request |
A field has the wrong type, or attributes holds a key that is not in the schema. |
| 401 | unauthorized |
The API key is missing, malformed or revoked. |
| 404 | not_found |
The chatbot or the contact does not exist. |
| 409 | conflict |
The new email address belongs to another contact of this chatbot. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |