Skip to main content

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.

SettingValue
MethodPOST
Path/api/v1/accounts/{account_id}/contacts/{contact_id}/labels
AuthorizationUser token. Any agent. Agent-bot tokens: not allowed.

Path parameters

NameTypeRequiredDescription
account_idintegerYesAccount ID.
contact_idintegerYesContact ID.

Body parameters (JSON)

NameTypeRequiredDescription
labelsstring[]YesThe 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​

The contact's labels after the change.