curl --request POST \
--url https://{organization}.rescueconsole.com/api/communications/templates/{id}/versions/{version}/restore \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/communications/templates/{id}/versions/{version}/restore', 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}/versions/{version}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, 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)"
}Restore a template version
Puts an earlier version’s subject, body and variables back, and records that as a NEW version with the note Restored version N. The history is not rewound. No request body is needed. Needs write on Communications.
curl --request POST \
--url https://{organization}.rescueconsole.com/api/communications/templates/{id}/versions/{version}/restore \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/communications/templates/{id}/versions/{version}/restore', 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}/versions/{version}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, 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)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Path Parameters
The template's ID (not its key).
The version number to put back.
x >= 1Response
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.