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": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({definition: {}})
};
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": {} }
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": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({definition: {}})
};
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": {} }
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes