curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/communications/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject_template": "Come and meet {{animal_name}} this weekend",
"note": "Visits moved to weekends."
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject_template: 'Come and meet {{animal_name}} this weekend',
note: 'Visits moved to weekends.'
})
};
fetch('https://{organization}.rescueconsole.com/api/communications/templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/communications/templates/{id}"
payload = {
"subject_template": "Come and meet {{animal_name}} this weekend",
"note": "Visits moved to weekends."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"key": "<string>",
"channel": "email",
"subject_template": "<string>",
"body_template": "<string>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"name": "<string>",
"body_template_blocks": [
{
"type": "p",
"runs": [
{
"text": "<string>",
"bold": true,
"italic": true,
"underline": true,
"strike": true,
"href": "<string>"
}
]
}
],
"variables": [
"<unknown>"
],
"metadata": {}
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Change a template
Changes a template. A change to the subject, the body or variables records a new version, with your note; a change to the name, the status or metadata alone does not. Anything that sends the template by its key sends the new wording from now on. Needs write on Communications.
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/communications/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject_template": "Come and meet {{animal_name}} this weekend",
"note": "Visits moved to weekends."
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject_template: 'Come and meet {{animal_name}} this weekend',
note: 'Visits moved to weekends.'
})
};
fetch('https://{organization}.rescueconsole.com/api/communications/templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/communications/templates/{id}"
payload = {
"subject_template": "Come and meet {{animal_name}} this weekend",
"note": "Visits moved to weekends."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"key": "<string>",
"channel": "email",
"subject_template": "<string>",
"body_template": "<string>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"name": "<string>",
"body_template_blocks": [
{
"type": "p",
"runs": [
{
"text": "<string>",
"bold": true,
"italic": true,
"underline": true,
"strike": true,
"href": "<string>"
}
]
}
],
"variables": [
"<unknown>"
],
"metadata": {}
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Path Parameters
The template's ID (not its key).
Body
Send only what changes. The key cannot be changed.
Null or blank clears it. Cut to 120 characters.
Cannot be empty.
1Cannot be empty. Sending this without body_template_blocks turns a document back into plain text.
A message written as a document: at most 200 blocks.
One block of a document. An unknown type is refused.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Replaces the list whole.
Merged into what is kept: a key you send replaces that key, and the others stay.
active, draft, archived Why the wording changed, kept on the version this change records.
Response
The template, as it now is.
What a send names the template by. It cannot be changed.
Always email.
email The subject, with any {{merge_fields}}.
The body as plain text, with any {{merge_fields}}. When the template is written as a document, this is the document's text.
Only an active template can be sent or filled.
active, draft, archived Your organization's ID.
The name people read. Null means the key stands in for it.
The body as a document, or null for a template written as plain text.
One block of a document. An unknown type is refused.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
A list kept with the template, as you last sent it.
Anything else you keep with the template.