Change a tag.
curl --request PATCH \
--url https://omni-api.sendblue.com/tags/{tag_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "customer"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'customer'})
};
fetch('https://omni-api.sendblue.com/tags/{tag_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/tags/{tag_id}"
payload = { "name": "customer" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "customer",
"name": "customer"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Change a tag.
A change that touches many contacts can be applied in separate batches. On write_outcome_unknown, reconcile the catalogue and affected contacts against the old and intended labels before issuing another change.
Required permission: tags:write. Accepted credentials: a signed-in person, an API key, the account token.
PATCH
/
tags
/
{tag_id}
Change a tag.
curl --request PATCH \
--url https://omni-api.sendblue.com/tags/{tag_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "customer"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'customer'})
};
fetch('https://omni-api.sendblue.com/tags/{tag_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/tags/{tag_id}"
payload = { "name": "customer" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "customer",
"name": "customer"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
personbearerlegacyKeyId & legacyKeySecret