דלג לתוכן הראשי
POST
/
labels
Create Label
curl --request POST \
  --url https://{projectID}.texterchat.com/server/api/v2/labels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "important",
  "name": "Important!",
  "color": "#a83236"
}
'
{
  "id": "important",
  "name": "Important!",
  "color": "#a83236"
}

הרשאות

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.

גוף

application/json
id
string
נדרש

Label ID (1-100 characters)

Required string length: 1 - 100
name
string
נדרש

Label display name (1-100 characters)

Required string length: 1 - 100
color
string

Label color in full hex format (e.g. #a83236)

תגובה

The newly created label. Field-by-field reference: The Label object

A label defined in Texter

id
string

Unique label ID (1-100 characters)

דוגמה:

"hot_lead"

name
string

Display name (1-100 characters)

דוגמה:

"HOT LEAD"

color
string

Full hex color (#RRGGBB). Defaults to #555555 when omitted at creation

דוגמה:

"#2CCCE4"

system
boolean

Present and true on system labels (defined by Texter, e.g. failed-message). System labels cannot be created or deleted via the API; only their name and color can be updated