Dry-run a workflow against a contact

Search Documentation

Search across all developer documentation

workflows

Dry-run a workflow against a contact

POST /v1/workflows/{id}/dry-run
Auth required api.workflows.view

Simulate one sample contact through the workflow's current definition, returning the step trace it would take — without sending any mail or enrolling the contact. Lets CI validate a workflow against real sample contacts before promotion. Returns 422 when the workflow source does not parse and 404 when the contact does not exist.

A call webhook step is simulated too, and never called: no request leaves SendOps. The trace shows the call falling through, or set webhook_outcome: "failed" to trace its failed: arm instead. An unknown webhook_outcome is 422.

Path parameters

id string required

The workflow's UUID or, when the value does not parse as a UUID, its org-unique key. Unknown handles read as 404 not_found. Accepted on every workflow route, read and write alike.

Request body

Content type: application/json

contact_id string required

The contact to simulate through the current definition — its id, your own external_id, or its email address. Must exist in the org. The two non-id forms are a contacts read and additionally require api.contacts.view; without it they are 403 invalid_scope.

webhook_outcome string enum optional

What every call webhook step in the definition should be assumed to return. ok (the default) traces the fall-through path; failed traces the failed: arm instead, so the arm can be rehearsed without an endpoint that fails on demand. Nothing is POSTed either way — a dry-run never calls a webhook. Any other value is 422.

One of: ok, failed

Default: ok

Responses

Errors follow the RFC 7807 problem format — see the error reference.

200 The simulated step trace application/json
contact_id string<uuid> required
steps array<object> required

Each entry in steps:

node_path string required
node_type string required

The statement kind at this step — send, delay, wait_until, wait_for, branch, split, hold_out, repeat, set, add_to_list, call_webhook, exit, end.

action string required

What the simulation did at this step (e.g. would-send, would call webhook, waited, matched-branch, exited).

detail string optional
401 Missing, malformed, or unknown API key application/problem+json
403 Key lacks the required scope or plan limit violated application/problem+json
404 Resource not found application/problem+json
422 A query parameter, path value or body field failed validation. The body is a validation_failed Problem. When the refusal is about a reference — a segment key, template slug, topic or attribute name the organization does not have — it additionally carries validation_code, field, line/column, missing, candidates and next_step, so a client can correct the call without a second round of guessing. See ValidationProblem. application/problem+json
429 Per-org rate limit exceeded application/problem+json
500 Unexpected server-side failure. The code is internal_error. The request_id field can be quoted to SendOps support to investigate. application/problem+json