Validate an automation definition
curl --request POST \
--url https://api.sendrealm.com/automations/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"trigger": {
"event_name": "<string>",
"filters": {
"rules": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"correlation": {
"key": "<string>"
}
},
"steps": [
{
"key": "<string>",
"type": "delay",
"config": {
"delay_seconds": 2
}
}
],
"connections": [
{
"from": "<string>",
"to": "<string>",
"branch": "<string>"
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
definition: {
trigger: {
event_name: '<string>',
filters: {rules: [{field: '<string>', value: '<string>'}]},
correlation: {key: '<string>'}
},
steps: [{key: '<string>', type: 'delay', config: {delay_seconds: 2}}],
connections: [{from: '<string>', to: '<string>', branch: '<string>'}]
}
})
};
fetch('https://api.sendrealm.com/automations/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/automations/validate"
payload = { "definition": {
"trigger": {
"event_name": "<string>",
"filters": { "rules": [
{
"field": "<string>",
"value": "<string>"
}
] },
"correlation": { "key": "<string>" }
},
"steps": [
{
"key": "<string>",
"type": "delay",
"config": { "delay_seconds": 2 }
}
],
"connections": [
{
"from": "<string>",
"to": "<string>",
"branch": "<string>"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"valid": true,
"errors": [
"<string>"
],
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Automations
Automation Reliability
Validate definitions, control failed runs, and test waits without delivery.
POST
/
automations
/
validate
Validate an automation definition
curl --request POST \
--url https://api.sendrealm.com/automations/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"trigger": {
"event_name": "<string>",
"filters": {
"rules": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"correlation": {
"key": "<string>"
}
},
"steps": [
{
"key": "<string>",
"type": "delay",
"config": {
"delay_seconds": 2
}
}
],
"connections": [
{
"from": "<string>",
"to": "<string>",
"branch": "<string>"
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
definition: {
trigger: {
event_name: '<string>',
filters: {rules: [{field: '<string>', value: '<string>'}]},
correlation: {key: '<string>'}
},
steps: [{key: '<string>', type: 'delay', config: {delay_seconds: 2}}],
connections: [{from: '<string>', to: '<string>', branch: '<string>'}]
}
})
};
fetch('https://api.sendrealm.com/automations/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/automations/validate"
payload = { "definition": {
"trigger": {
"event_name": "<string>",
"filters": { "rules": [
{
"field": "<string>",
"value": "<string>"
}
] },
"correlation": { "key": "<string>" }
},
"steps": [
{
"key": "<string>",
"type": "delay",
"config": { "delay_seconds": 2 }
}
],
"connections": [
{
"from": "<string>",
"to": "<string>",
"branch": "<string>"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"valid": true,
"errors": [
"<string>"
],
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Validate before publish
POST /automations/validate accepts { "definition": { ... } } and returns
valid, human-readable errors, and structured validation issues.
wait_for_event supports a canonical timeout_seconds value. Legacy
timeout: { amount, unit } definitions are normalized for compatibility, but
new definitions should always use seconds.
Correlated waits
Define a trigger correlation key and use the same key on a wait:{
"trigger": {
"event_name": "checkout.started",
"correlation": {
"key": "checkout_id",
"duplicate_policy": "ignore_active"
}
},
"steps": [
{
"key": "wait_for_checkout",
"type": "wait_for_event",
"config": {
"event_name": "checkout.completed",
"timeout_seconds": 3600,
"correlation": { "key": "checkout_id" }
}
}
]
}
end_automation as a terminal step for an explicit successful branch.
Run controls
POST /automation-runs/:runId/cancelPOST /automation-runs/:runId/retry
{ "reason": "..." }, are project-scoped and audited,
and require a Sendrealm API key. Cancellation cannot retract a delivery that
has already started.
Test runs
Test a saved draft without delivery or production mutations:POST /automations/:id/test-runsGET /automation-test-runs/:runIdPOST /automation-test-runs/:runId/eventsPOST /automation-test-runs/:runId/advance
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 project context. Required for personal-key project resource calls; integration keys retain their configured default. MCP clients supply project_id in each tool call instead.
Body
application/json
Show child attributes
Show child attributes