Automation runs and debugging
Run states, why an automation pauses and what lifts it, and how to find, fix and retry a run that failed without sending anything twice.
A run is one contact's trip through one version. Its step timeline records every block it ran, what each did, and why it stopped.
Run states
| Status | Meaning |
|---|---|
ACTIVE | running a step now |
WAITING | parked at a wait until its timer or event |
COMPLETED | ran to the end of its path: an Exit block (the run's exit reason is the block's reason, else finished) or a block with nothing after it |
EXITED | left early: an exit condition, the run's time limit, a removed block, a stale hold, or restarted: its own trigger event came again before it sent anything (a goal on the trigger event) |
GOAL_MET | the policy's goal event happened, so the run ended |
FAILED | a step failed (the exit reason names the block, and retry continues from it) or the run hit its action limit |
CANCELED | someone canceled it |
Why didn't someone get an email?
- List the automation's runs for that contact:
GET /v1/automations/{id}/runs?contact_id=con_…(orstatus=problemsfor every failure). - Open the run:
GET /v1/automations/runs/{run_id}. The timeline names the block, its outcome (a skip reason likenot_subscribedorfrequency_capped, or the error), and where a live run is waiting and until when. - Fix the cause in the draft (a template value with no source, a sender that stopped verifying, a webhook that fails), validate, and publish. If the automation paused itself (
pause_reasonerror_threshold: one block failed 3 runs in a row), publishing the fix also resumes it and continues the held run. - Retry the failed runs. They continue from the failed block on the live version; a message that already went out is never sent again.
curl -X GET 'https://www.unitpost.com/api/v1/automations/runs/run_123' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'curl -X POST 'https://www.unitpost.com/api/v1/automations/atm_123/runs/retry' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"since": "2026-11-01T00:00:00Z",
"limit": 50
}'Retry, skip a wait, cancel
- A paused automation holds its runs where they are, including the run whose step paused it; resume (or a publish) continues them.
- While paused, a trigger that fires starts nothing, and it isn't replayed on resume. A run on a wait keeps counting; when its next step comes due during the pause, the pause holds it there (the run reads
held: true). - A message held for more than 7 days by a pause is not sent on resume unless you pass
send_stale: true. - Retry continues a failed run from the block that failed, on the live version. A message that already went out is never sent again.
- Retrying many failed runs takes a
sincetime and does up to 200 per call. - Skip wait ends one waiting run's wait now: a Wait continues, a Wait for event takes its timeout path.
- Publishing a new version moves everyone mid-journey to it at the block they're on; a wait in progress keeps its end time.
Why an automation is paused
A paused automation enrolls nobody and holds its runs where they are. pause_reason says why, and what lifts it:
| pause_reason | Meaning | What lifts it |
|---|---|---|
user | Someone paused it. Resume when ready. | Resume |
dependency_broken | A template, segment, topic or sender it uses is gone or a template was unpublished under it, or a text step found no SMS number that can send. The run that hit it waits at that step. Publish the template again (or get a number live), then resume; for something deleted, point the block at another one and publish the automation, which also continues the held runs. | Resume |
dependency_unhealthy | A template was unpublished or a sender domain is re-verifying. It resumes on its own once that recovers. | On its own |
error_threshold | A block failed 3 runs in a row (onError: pause_run, the default); the last run is held. Fix the cause, then resume. | Resume |
budget_exhausted | Kept for a spend limit; nothing sets it today. | Resume |
billing | The plan's runs, email or SMS allowance is used up, or billing needs attention. It resumes on its own when the allowance returns. | On its own |
workspace_suspended | The workspace is suspended. Contact support. | Unitpost support |
blocked | Unitpost blocked the sending domain or SMS brand. It resumes on its own once the block is lifted. | On its own |
throttled | The account review throttle holds sends. It resumes on its own once the throttle lifts. | On its own |
sending_paused | The workspace's transactional email is paused (Settings → Deliverability says why). Resume the automation once it is resumed. A marketing pause never pauses an automation: only the runs at a marketing email wait, and they continue on their own. | Resume |
staff | Unitpost support paused it. Only support can lift it. | Unitpost support |
Archive, restore, delete
- Archive switches an automation off at once: nothing new starts, runs in progress are canceled (nothing more is sent to them), a running backfill stops, and it becomes read-only. It is deleted for good 30 days later unless it is unarchived;
delete_aftersays when. - Unarchive brings it back switched off: paused if it was ever published (resume it to send again), a draft if not (publish it). Unarchiving never sends by itself, and Resume first re-checks every template, segment, topic, sender and endpoint it uses, and any billing, block or review pause it had when it was archived.
- Delete is permanent and can't be undone: the automation is gone from every list and read, its runs in progress are canceled, and its run history ages out as usual. An archived one is deleted the same way when its
delete_afterpasses. - Archived automations are hidden from lists by default;
archived=truelists only them.
curl -X POST 'https://www.unitpost.com/api/v1/automations/atm_123/archive' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'How it's doing
How a live automation is doing: GET /automations/{id}/stats gives its runs by status (the last days, default 7, and since it started), the goal rate, and per block of the live version the runs that entered, succeeded, failed, were skipped (by reason) or wait there now, marking the blocks runs fail at as failing, and while the workspace's marketing email is paused how many runs wait at a marketing email (runs.held_marketing; they send once it is resumed). GET /automations/{id}/runs?block= lists the runs at a block or that failed at it, and each run that ends failed sends the automation.run.failed webhook.