Update Existing Label
curl --request PATCH \
--url https://{projectID}.texterchat.com/server/api/v2/labels/{labelId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Message failed to send",
"color": "#a769ff"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Message failed to send', color: '#a769ff'})
};
fetch('https://{projectID}.texterchat.com/server/api/v2/labels/{labelId}', 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/{labelId}"
payload = {
"name": "Message failed to send",
"color": "#a769ff"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)"OK"{
"error": "Invalid name length - Should be between 1 and 100 characters"
}{
"error": "<string>"
}Labels
Update Existing Label
Update the details of an existing label. You can modify the label’s name or color, but not its id.
PATCH
https://{projectID}.texterchat.com/server/api/v2
/
labels
/
{labelId}
Update Existing Label
curl --request PATCH \
--url https://{projectID}.texterchat.com/server/api/v2/labels/{labelId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Message failed to send",
"color": "#a769ff"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Message failed to send', color: '#a769ff'})
};
fetch('https://{projectID}.texterchat.com/server/api/v2/labels/{labelId}', 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/{labelId}"
payload = {
"name": "Message failed to send",
"color": "#a769ff"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)"OK"{
"error": "Invalid name length - Should be between 1 and 100 characters"
}{
"error": "<string>"
}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.
Path Parameters
The unique identifier of the label. You can retrieve all existing labels using the List All Labels endpoint
Body
application/json
Response
Label updated. Body is the plain text OK. Note: fields that are omitted or empty are ignored; a body with no effective fields is a no-op that also returns 200 - even for a nonexistent labelId