curl --request PATCH \
--url https://api.sendrealm.com/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '
{
"name": "<string>",
"description": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {
"type": "doc",
"content": [
{
"text": "<string>",
"attrs": {},
"marks": [
{
"attrs": {}
}
],
"content": "<array>"
}
]
},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
{
"locale": "<string>",
"title": "<string>",
"message": "<string>",
"image_url": "<string>",
"launch_url": "<string>"
}
]
}
'const options = {
method: 'PATCH',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
subject_template: '<string>',
preview_text: '<string>',
editor_json: {
type: 'doc',
content: [{text: '<string>', attrs: {}, marks: [{attrs: {}}], content: '<array>'}]
},
rendered_html: '<string>',
rendered_text: '<string>',
default_locale: '<string>',
messages: [
{
locale: '<string>',
title: '<string>',
message: '<string>',
image_url: '<string>',
launch_url: '<string>'
}
]
})
};
fetch('https://api.sendrealm.com/templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/templates/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {
"type": "doc",
"content": [
{
"text": "<string>",
"attrs": {},
"marks": [{ "attrs": {} }],
"content": "<array>"
}
]
},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
{
"locale": "<string>",
"title": "<string>",
"message": "<string>",
"image_url": "<string>",
"launch_url": "<string>"
}
]
}
headers = {
"X-Sendrealm-Project-Id": "<x-sendrealm-project-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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"
}
]
}
}Templates update
Feature-gated personal-key operation. Scope, saved grants, current role and resource ownership all apply. Billing is excluded.
curl --request PATCH \
--url https://api.sendrealm.com/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '
{
"name": "<string>",
"description": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {
"type": "doc",
"content": [
{
"text": "<string>",
"attrs": {},
"marks": [
{
"attrs": {}
}
],
"content": "<array>"
}
]
},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
{
"locale": "<string>",
"title": "<string>",
"message": "<string>",
"image_url": "<string>",
"launch_url": "<string>"
}
]
}
'const options = {
method: 'PATCH',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
subject_template: '<string>',
preview_text: '<string>',
editor_json: {
type: 'doc',
content: [{text: '<string>', attrs: {}, marks: [{attrs: {}}], content: '<array>'}]
},
rendered_html: '<string>',
rendered_text: '<string>',
default_locale: '<string>',
messages: [
{
locale: '<string>',
title: '<string>',
message: '<string>',
image_url: '<string>',
launch_url: '<string>'
}
]
})
};
fetch('https://api.sendrealm.com/templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/templates/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"subject_template": "<string>",
"preview_text": "<string>",
"editor_json": {
"type": "doc",
"content": [
{
"text": "<string>",
"attrs": {},
"marks": [{ "attrs": {} }],
"content": "<array>"
}
]
},
"rendered_html": "<string>",
"rendered_text": "<string>",
"default_locale": "<string>",
"messages": [
{
"locale": "<string>",
"title": "<string>",
"message": "<string>",
"image_url": "<string>",
"launch_url": "<string>"
}
]
}
headers = {
"X-Sendrealm-Project-Id": "<x-sendrealm-project-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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"
}
]
}
}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
Display name, unique within project and channel.
1 - 1201000010000001000000Canonical email document. Do not combine with rendered_html/rendered_text. Null explicitly clears the editor when switching to raw content.
Show child attributes
Show child attributes
Raw email HTML. Clear editor_json explicitly before switching an existing document to raw HTML.
1000000100000035Push-only localized messages. Replaces the entire list; empty leaves an incomplete draft.
100Show child attributes
Show child attributes