Templates restore
curl --request POST \
--url https://api.sendrealm.com/templates/{id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '
{
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({version_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.sendrealm.com/templates/{id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/templates/{id}/restore"
payload = { "version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"X-Sendrealm-Project-Id": "<x-sendrealm-project-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"channel": "<string>",
"status": "<string>",
"current_draft_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_published_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"current_draft_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"channel": "<string>",
"state": "<string>",
"label": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
"<string>"
],
"published_at": "2023-11-07T05:31:56Z",
"restored_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"current_published_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"channel": "<string>",
"state": "<string>",
"label": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
"<string>"
],
"published_at": "2023-11-07T05:31:56Z",
"restored_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"channel": "<string>",
"state": "<string>",
"label": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
"<string>"
],
"published_at": "2023-11-07T05:31:56Z",
"restored_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}Agent messaging API
Templates restore
Feature-gated personal-key operation. Scope, saved grants, current role and resource ownership all apply. Billing is excluded.
POST
/
templates
/
{id}
/
restore
Templates restore
curl --request POST \
--url https://api.sendrealm.com/templates/{id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '
{
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({version_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.sendrealm.com/templates/{id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/templates/{id}/restore"
payload = { "version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"X-Sendrealm-Project-Id": "<x-sendrealm-project-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"channel": "<string>",
"status": "<string>",
"current_draft_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"current_published_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"current_draft_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"channel": "<string>",
"state": "<string>",
"label": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
"<string>"
],
"published_at": "2023-11-07T05:31:56Z",
"restored_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"current_published_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"channel": "<string>",
"state": "<string>",
"label": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
"<string>"
],
"published_at": "2023-11-07T05:31:56Z",
"restored_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"channel": "<string>",
"state": "<string>",
"label": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
"<string>"
],
"published_at": "2023-11-07T05:31:56Z",
"restored_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}Requires the messaging rollout flag and explicit personal-key permissions. Live publishing and lifecycle changes require an expiring preparation and idempotent execution.
Authorizations
Integration key for backend workloads, or a scoped personal key (sr_user_) for account discovery and supported project operations. MCP accepts only personal keys.
Headers
Explicit authorized project. Its team is derived server-side.
Path Parameters
Body
application/json