Set Contact Labels
POST/accounts/:account_id/contacts/:contact_id/labels
Replaces the contact's labels with the given list.
Send [] to remove all labels. Label titles are not checked against the account's labels, so any string is accepted. Use existing label titles so the labels show up with their colours in the dashboard.
| Setting | Value |
|---|---|
| Method | POST |
| Path | /api/v1/accounts/{account_id}/contacts/{contact_id}/labels |
| Authorization | User token. Any agent. Agent-bot tokens: not allowed. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id | integer | Yes | Account ID. |
contact_id | integer | Yes | Contact ID. |
Body parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
labels | string[] | Yes | The full list of label titles. |
Example request
curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/labels' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "labels": ["vip", "billing"] }'
Example response (200 OK)
{ "payload": ["vip", "billing"] }
Request
Responses
- 200
- 401
- 403
- 404
The contact's labels 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.