Get custom attributes schema
GET/v1/chatbots/{chatbotId}/contacts/attributes
List the custom contact attributes defined for a chatbot with the legacy v1 API, including their names, types and descriptions.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Returns the schema of custom contact attributes for a chatbot. Call it before you import contacts, to check which attribute keys are valid and what type each one expects.
Request
GET /v1/chatbots/{chatbotId}/contacts/attributes
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
chatbotId |
string | Yes | The ID of the chatbot, starting with agt_. |
The request has no body and no query parameters. The list is not paginated, because a schema stays small.
Use the schema as a checklist when you map fields from another system. Each key you send in attributes on a contact must appear here with a matching type, otherwise the call fails with invalid_request.
Example request
curl https://api.askocto.co/v1/chatbots/agt_8f3k2m/contacts/attributes \
-H "Authorization: Bearer $OCTO_API_KEY"
const response = await fetch(
"https://api.askocto.co/v1/chatbots/agt_8f3k2m/contacts/attributes",
{ headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` } },
)
const { data } = await response.json()
for (const attribute of data) {
console.log(attribute.name, attribute.type)
}
Example response
A successful call returns 200 OK.
{
"data": [
{
"name": "plan",
"type": "string",
"description": "The subscription plan of the customer.",
"createdAt": "2026-03-14T09:30:00Z"
},
{
"name": "renewalDate",
"type": "date",
"description": "When the current subscription renews.",
"createdAt": "2026-03-16T10:12:00Z"
},
{
"name": "isVip",
"type": "boolean",
"description": "Whether the customer is on the priority list.",
"createdAt": "2026-03-17T08:00:00Z"
}
]
}
Response fields
| Name | Type | Description |
|---|---|---|
data |
array | All custom attributes of the chatbot. |
data[].name |
string | The attribute key used inside attributes on a contact. |
data[].type |
string | string, number, boolean or date. |
data[].description |
string | The description you gave the attribute. |
data[].createdAt |
string | ISO 8601 UTC creation time. |
Add an attribute with Create custom attribute, or change one with Update custom attribute. The same schema is shown in the dashboard, see Contacts overview.
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized |
The API key is missing, malformed or revoked. |
| 404 | not_found |
No chatbot with this ID exists in your workspace. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |