Update custom attribute
PATCH/v1/chatbots/{chatbotId}/contacts/attributes/{attributeName}
Rename a custom contact attribute or change its description for a chatbot with the legacy v1 API.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Renames a custom attribute or changes its description. Call it when a field in your CRM is renamed and you want the contact schema to follow.
Request
PATCH /v1/chatbots/{chatbotId}/contacts/attributes/{attributeName}
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
chatbotId |
string | Yes | The ID of the chatbot, starting with agt_. |
attributeName |
string | Yes | The current name of the attribute, for example plan. |
Body fields. Send only the ones you want to change:
| Name | Type | Required | Description |
|---|---|---|---|
name |
string | No | The new attribute name. Letters, numbers and underscores only. |
description |
string | No | The new description. |
The type of an attribute cannot be changed. Create a new attribute with Create custom attribute when you need another type. Values already stored on contacts move with a renamed attribute.
Example request
curl -X PATCH https://api.askocto.co/v1/chatbots/agt_8f3k2m/contacts/attributes/plan \
-H "Authorization: Bearer $OCTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "subscriptionPlan",
"description": "The plan the customer pays for."
}'
const response = await fetch(
"https://api.askocto.co/v1/chatbots/agt_8f3k2m/contacts/attributes/plan",
{
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.OCTO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "subscriptionPlan",
description: "The plan the customer pays for.",
}),
},
)
console.log(await response.json())
Example response
A successful call returns 200 OK with the updated attribute.
{
"name": "subscriptionPlan",
"type": "string",
"description": "The plan the customer pays for.",
"createdAt": "2026-03-14T09:30:00Z"
}
Response fields
| Name | Type | Description |
|---|---|---|
name |
string | The attribute name after the change. Use it as the key in attributes from now on. |
type |
string | The value type, unchanged. |
description |
string | The description after the change. |
createdAt |
string | ISO 8601 UTC time the attribute was first created. |
After a rename, update any integration that still writes the old key, or its calls fail with invalid_request. The full list is in Get custom attributes schema.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request |
The new name has characters outside letters, numbers and underscores. |
| 401 | unauthorized |
The API key is missing, malformed or revoked. |
| 404 | not_found |
The chatbot or the attribute does not exist. |
| 409 | conflict |
Another attribute already uses the new name. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |