Change a variable's display name.
curl --request PATCH \
--url https://omni-api.sendblue.com/variables/{variable_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Birthday"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Birthday'})
};
fetch('https://omni-api.sendblue.com/variables/{variable_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/variables/{variable_id}"
payload = { "name": "Birthday" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "var-1",
"name": "Birthday",
"type": "date",
"created_at": null
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Change a variable's display name.
If completion is unknown, read the variable and compare its current name before issuing another change.
Required permission: variables:write. Accepted credentials: a signed-in person, an API key, the account token.
PATCH
/
variables
/
{variable_id}
Change a variable's display name.
curl --request PATCH \
--url https://omni-api.sendblue.com/variables/{variable_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Birthday"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Birthday'})
};
fetch('https://omni-api.sendblue.com/variables/{variable_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/variables/{variable_id}"
payload = { "name": "Birthday" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "var-1",
"name": "Birthday",
"type": "date",
"created_at": null
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
personbearerlegacyKeyId & legacyKeySecret