Docs
/
/

Workflow runs API reference

Complete reference documentation for the Workflow runs resource.

Workflow runs

#

A workflow run represents an individual execution of a workflow for a specific recipient. Use the workflow runs API to inspect the status and event history of a workflow run, including which steps were executed and any errors encountered.

List workflow recipient runs

#

Returns a paginated list of workflow recipient runs for the current environment.

Endpoint

GET/v1/workflow_recipient_runs

Query parameters

after
string

The cursor to fetch entries after.

before
string

The cursor to fetch entries before.

page_size
integer

The number of items per page (defaults to 50).

workflow
string

Limits the results to workflow recipient runs for the given workflow key.

status[]
enum(string)[]

Limits the results to workflow recipient runs with the given status.

queuedprocessingpausedcompletedcancelled
tenant
string

Limits the results to workflow recipient runs for the given tenant.

has_errors
boolean

Limits the results to workflow recipient runs that have errors.

recipient
2 possible types

Limits the results to workflow recipient runs for the given recipient. Accepts a user ID string or an object reference with id and collection.

starting_at
string(date-time)

Limits the results to workflow recipient runs started after the given date.

ending_at
string(date-time)

Limits the results to workflow recipient runs started before the given date.

Returns

ListWorkflowRecipientRunsResponse

A paginated list of workflow recipient runs.

A list of workflow recipient runs.

__typename
string
Required

The typename of the schema.

The actor who triggered the workflow recipient run.

error_count
integer

The number of errors encountered during the workflow recipient run.

id
string(uuid)
Required

The unique identifier for the workflow recipient run (per-recipient).

inserted_at
string(date-time)
Required

Timestamp when the resource was created.

recipient
2 possible types
Required

A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).

status
enum(string)
Required

The current status of the workflow recipient run. One of queued, processing, paused, completed, or cancelled.

queuedprocessingpausedcompletedcancelled
tenant
string

The tenant associated with the workflow recipient run.

trigger_source
WorkflowRecipientRunTriggerSource
Required

Describes how the workflow was triggered.

audience_key
string

The key of the audience that triggered the workflow.

cancellation_key
string

The cancellation key provided when the workflow was triggered via the API.

schedule_id
string

The ID of the schedule that triggered the workflow.

type
enum(string)
Required

The type of trigger source. One of api, audience, schedule, broadcast, workflow_step, integration, or rehearsal.

apiaudienceschedulebroadcastworkflow_stepintegrationrehearsal
updated_at
string(date-time)
Required

The timestamp when the resource was last updated.

workflow
string
Required

The key of the workflow that was executed.

workflow_run_id
string(uuid)
Required

The identifier for the top-level workflow run shared across all recipients in a single trigger.

page_info

Pagination information for a list of resources.

__typename
string

The typename of the schema.

after
string

The cursor to fetch entries after.

before
string

The cursor to fetch entries before.

page_size
integer

The number of items per page (defaults to 50).

Get a workflow recipient run

#

Returns a single workflow recipient run with its associated events.

Endpoint

GET/v1/workflow_recipient_runs/{id}

Path parameters

id
string

The unique identifier for the workflow recipient run (per-recipient).

Returns

A workflow recipient run represents an individual execution of a workflow for a specific recipient.

__typename
string

The typename of the schema.

The actor who triggered the workflow recipient run.

error_count
integer

The number of errors encountered during the workflow recipient run.

id
string(uuid)

The unique identifier for the workflow recipient run (per-recipient).

inserted_at
string(date-time)

Timestamp when the resource was created.

recipient
2 possible types

A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).

status
enum(string)

The current status of the workflow recipient run. One of queued, processing, paused, completed, or cancelled.

queuedprocessingpausedcompletedcancelled
tenant
string

The tenant associated with the workflow recipient run.

trigger_source
WorkflowRecipientRunTriggerSource

Describes how the workflow was triggered.

audience_key
string

The key of the audience that triggered the workflow.

cancellation_key
string

The cancellation key provided when the workflow was triggered via the API.

schedule_id
string

The ID of the schedule that triggered the workflow.

type
enum(string)

The type of trigger source. One of api, audience, schedule, broadcast, workflow_step, integration, or rehearsal.

apiaudienceschedulebroadcastworkflow_stepintegrationrehearsal
updated_at
string(date-time)

The timestamp when the resource was last updated.

workflow
string

The key of the workflow that was executed.

workflow_run_id
string(uuid)

The identifier for the top-level workflow run shared across all recipients in a single trigger.

WorkflowRecipientRun

#

A workflow recipient run represents an individual execution of a workflow for a specific recipient.

Attributes

__typename
string

The typename of the schema.

The actor who triggered the workflow recipient run.

error_count
integer

The number of errors encountered during the workflow recipient run.

id
string(uuid)

The unique identifier for the workflow recipient run (per-recipient).

inserted_at
string(date-time)

Timestamp when the resource was created.

recipient
2 possible types

A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).

status
enum(string)

The current status of the workflow recipient run. One of queued, processing, paused, completed, or cancelled.

queuedprocessingpausedcompletedcancelled
tenant
string

The tenant associated with the workflow recipient run.

trigger_source
WorkflowRecipientRunTriggerSource

Describes how the workflow was triggered.

audience_key
string

The key of the audience that triggered the workflow.

cancellation_key
string

The cancellation key provided when the workflow was triggered via the API.

schedule_id
string

The ID of the schedule that triggered the workflow.

type
enum(string)

The type of trigger source. One of api, audience, schedule, broadcast, workflow_step, integration, or rehearsal.

apiaudienceschedulebroadcastworkflow_stepintegrationrehearsal
updated_at
string(date-time)

The timestamp when the resource was last updated.

workflow
string

The key of the workflow that was executed.

workflow_run_id
string(uuid)

The identifier for the top-level workflow run shared across all recipients in a single trigger.

WorkflowRecipientRunDetail

#

A single workflow recipient run with its events.

Attributes

WorkflowRecipientRunDetail
2 possible types

A single workflow recipient run with its events.

WorkflowRecipientRunEvent

#

An event that occurred during a workflow recipient run.

Attributes

__typename
string

The typename of the schema.

attempt
integer

The attempt number of the workflow recipient run event. Increments for each retry.

data
object(any)

Event-specific data associated with the event.

event
string

The type of event that occurred.

id
string

The unique identifier for the event.

inserted_at
string(date-time)

Timestamp when the resource was created.

status
enum(string)

Whether the event represents a successful or error state.

okerror
step_ref
string

The reference of the workflow step associated with this event.

step_type
string

The type of workflow step associated with this event.

New chat