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!"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'important', name: 'Important!'})
};
fetch('https://{projectID}.texterchat.com/server/api/v2/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{projectID}.texterchat.com/server/api/v2/labels"
payload = {
"id": "important",
"name": "Important!"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "important",
"name": "Important!",
"color": "#a83236"
}Labels
Create Label
Create a new label in Texter.
POST
https://{projectID}.texterchat.com/server/api/v2
/
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!"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'important', name: 'Important!'})
};
fetch('https://{projectID}.texterchat.com/server/api/v2/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{projectID}.texterchat.com/server/api/v2/labels"
payload = {
"id": "important",
"name": "Important!"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "important",
"name": "Important!",
"color": "#a83236"
}Required token scopes:
Manage labelsAuthorizations
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.
Body
application/json
Response
The newly created label. Field-by-field reference: The Label object
A label defined in Texter
Unique label ID (1-100 characters)
Example:
"hot_lead"
Display name (1-100 characters)
Example:
"HOT LEAD"
Full hex color (#RRGGBB). Defaults to #555555 when omitted at creation
Example:
"#2CCCE4"
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