curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/chats/{chatId}/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
"manager",
"VIP",
"holiday"
]
}
'"OK"Manage Labels in Chat
Manage labels for a specific chat. Provide exactly one of three actions: add, remove, or set (with label IDs).
curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/chats/{chatId}/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
"manager",
"VIP",
"holiday"
]
}
'"OK"Manage all chats
Using set overrides any existing labels on the chat and replaces them with the new list you provide. Passing "set": [] clears all labels from the chat.Authorizations
API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.
Path Parameters
The unique identifier of the chat. You can obtain this value by using the Search Chats endpoint with the contact's phone number
Body
- Option 1
- Option 2
- Option 3
Label IDs to add to the chat. Every ID must exist (unknown IDs return 400)
1Label IDs to remove from the chat. Strict: every listed label must currently be applied to the chat, otherwise 400 (not an idempotent no-op)
1Label IDs that replace all existing labels. Every ID must exist (unknown IDs return 400). May be empty to clear all labels
Response
Labels updated. Body is the plain text OK