Set Conversation Custom Attributes
POST/accounts/:account_id/conversations/:conversation_id/custom_attributes
Replaces the conversation's custom attributes with the given object.
warning
This call overwrites the conversation's custom_attributes: keys you
leave out are removed, so send the full object.
| Setting | Value |
|---|---|
| Method | POST |
| Path | /api/v1/accounts/{account_id}/conversations/{conversation_id}/custom_attributes |
| Authorization | User token or agent-bot token. |
Permissions:
- User token: any agent who may see the conversation — see Who can see a conversation.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id | integer | Yes | Account ID. |
conversation_id | integer | Yes | Conversation display ID. |
Body parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
custom_attributes | object | Yes | Key/value pairs. Use the keys of conversation custom attributes defined in Settings → Custom attributes so they show in the dashboard. |
Example request
curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/custom_attributes' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "custom_attributes": { "order_id": "A-1001", "items_count": 2 } }'
Example response (200 OK)
{
"custom_attributes": {
"order_id": "A-1001",
"items_count": 2
}
}
Remarks
- A change fires the
conversation_updatedwebhook event.
Request
Responses
- 200
- 401
- 403
- 404
The conversation's custom attributes after the change.
The access token is missing or wrong, or its user does not belong to this account.
The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See Authorization.
The resource does not exist in this account.