דלג לתוכן הראשי
POST
/
chats
/
{chatId}
/
labels
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"

הרשאות

Authorization
string
header
נדרש

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.

פרמטרי נתיב

chatId
string
נדרש

The unique identifier of the chat. You can obtain this value by using the Search Chats endpoint with the contact's phone number

גוף

application/json
add
string[]

Label IDs to add to the chat

Minimum array length: 1
remove
string[]

Label IDs to remove from the chat

Minimum array length: 1
set
string[]

Label IDs that replace all existing labels. May be empty to clear all labels

תגובה

Labels updated. Body is the plain text OK