Templates publish prepare
curl --request POST \
--url https://api.sendrealm.com/templates/{id}/actions/publish/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '{}'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.sendrealm.com/templates/{id}/actions/publish/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/templates/{id}/actions/publish/prepare"
payload = {}
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": {
"prepared_action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"effects": {
"resource_type": "templates",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "publish",
"current_status": "<string>",
"proposed_status": "<string>",
"live_automation_effects": true,
"immediately_sends_messages": false
}
}
}Agent messaging API
Templates publish prepare
Feature-gated personal-key operation. Scope, saved grants, current role and resource ownership all apply. Billing is excluded.
POST
/
templates
/
{id}
/
actions
/
publish
/
prepare
Templates publish prepare
curl --request POST \
--url https://api.sendrealm.com/templates/{id}/actions/publish/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Sendrealm-Project-Id: <x-sendrealm-project-id>' \
--data '{}'const options = {
method: 'POST',
headers: {
'X-Sendrealm-Project-Id': '<x-sendrealm-project-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.sendrealm.com/templates/{id}/actions/publish/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/templates/{id}/actions/publish/prepare"
payload = {}
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": {
"prepared_action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"effects": {
"resource_type": "templates",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "publish",
"current_status": "<string>",
"proposed_status": "<string>",
"live_automation_effects": true,
"immediately_sends_messages": false
}
}
}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
The body is of type object.