Get a run
const url = 'https://api.usesonora.com/v1/workflow-runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.usesonora.com/v1/workflow-runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'One run: its trigger, steps, what it is waiting on, and every email it produced with per-recipient engagement. A fan-out branch’s id or a private workflow’s run is 404.
Requires the workflows:read scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”The run.
One run: its trigger, steps, what it is waiting on, and every email it produced.
object
object
The workflow’s chain root id.
The version the run executes.
Who an API call named and the run reaches; empty otherwise.
One person an API call named that the run reaches.
object
This resource’s canonical URL on the API host.
What the API call that started a run asked for, and who it skipped.
object
object
The roles the call matched, as slugs.
object
A person the call named who won’t be emailed.
object
recently_triggered only: the run that last reached them through this workflow.
recently_triggered only: when the resend window lets a call reach them again.
object
The run that took the step: the root, or one fan-out branch.
One email a run produced, per recipient once it has gone out.
object
Why a send reached fewer people than it addressed, or nobody.
Example
{ "status": "active", "origin": "auto", "recipients": [ { "matchedBy": [ { "type": "role" } ] } ], "trigger": { "skippedRecipients": [ { "reason": "unsubscribed", "matchedBy": [ { "type": "role" } ] } ] }, "waitingOn": "review", "messages": [ { "status": "draft", "trackingScope": "recipient" } ]}unauthorized: The Authorization header is missing, or the key is invalid, revoked or expired.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}insufficient_scope: The key or token lacks the scope this endpoint needs, and details.required names it; or an OAuth access token called an endpoint only an API key can.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}run_not_found: No workflow run with that id.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}rate_limited: Too many requests for this key; retry after Retry-After seconds.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}internal_error: Something went wrong on Sonora’s side. Retry, and quote requestId if it persists.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}Try it
Run this request against your own Sonora workspace. Sign in, pick the workspace, and the page gets an access token that only reads, only what your role covers, for an hour.
Signed in.
As curl
$SONORA_TOKEN is your access token or an API key; the page never shows the token.