Skip to main content
POST
Validate an automation definition

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:
Use end_automation as a terminal step for an explicit successful branch.

Run controls

  • POST /automation-runs/:runId/cancel
  • POST /automation-runs/:runId/retry
Both accept an optional { "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-runs
  • GET /automation-test-runs/:runId
  • POST /automation-test-runs/:runId/events
  • POST /automation-test-runs/:runId/advance
Test runs record simulated actions, use isolated synthetic events, and advance delays or wait timeouts with a virtual clock.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
definition
object
required

Response

Validation result with errors and structured issues

status
number
data
unknown
error
unknown
metadata
unknown