Workflows
Workflows (also known as Flows) trigger actions based on events and conditions. They power welcome series, abandoned cart recovery, re-engagement campaigns, and complex multi-branch journeys. The Workflows API is read-only. Use it to list workflows, fetch one workflow's structure, and read per-step stats.
Available Endpoints
- GET
/fetch/workflowsGet Workflows
List workflows and associated email templates.
- GET
/fetch/workflows/:idGet Workflow
Fetch one workflow with its triggers, nodes, and transitions.
- GET
/fetch/workflows/:id/statsGet Workflow Stats
Fetch per-step entry counts and email stats for one workflow.
The Workflow Model
The workflow model represents an automation flow with its associated email templates and performance statistics. Get Workflow also returns the flow structure.
Properties
- Name
idstring- Description
The unique identifier for the workflow
- Name
namestring- Description
The name of the workflow
- Name
statusstring- Description
live,draft, ordeleted. Returned only by Get Workflow.
- Name
created_atdatetime- Description
When the workflow was created
- Name
updated_atdatetime- Description
When the workflow was last updated. Returned only by Get Workflow.
- Name
email_templatesarray- Description
Array of email templates used in this workflow, each with id, subject, and stats
- Name
triggersarray- Description
Entry points for the workflow. Returned only by Get Workflow.
- Name
nodesarray- Description
Every step in the workflow. Returned only by Get Workflow.
Get Workflows
/v1/fetch/workflowsReturns a list of all workflows in your account, including their associated email templates and performance statistics.
Query Parameters
- Name
site_uuidstringRequired- Description
Your site's unique identifier
- Name
pageinteger- Description
Page number for pagination (optional)
Response
Returns a list of workflows with their email templates and stats.
- Name
dataarray- Description
Workflow records.
- Name
data[].idstring- Description
Workflow identifier.
- Name
data[].namestring- Description
Workflow name.
- Name
data[].email_templatesarray- Description
Email templates used in the workflow.
Get Workflow
/v1/fetch/workflows/:idReturns one workflow with its full structure. Use the workflow id from Get Workflows, such as flow_abc123.
Path Parameters
- Name
idstringRequired- Description
The workflow id from Get Workflows
Query Parameters
- Name
site_uuidstringRequired- Description
Your site's unique identifier
Response
Returns one workflow with its triggers, nodes, and email templates.
- Name
data.idstring- Description
Workflow identifier.
- Name
data.typestring- Description
Resource type, typically
workflow.
- Name
data.attributes.namestring- Description
Workflow name.
- Name
data.attributes.statusstring- Description
live,draft, ordeleted.
- Name
data.attributes.created_atdatetime- Description
When the workflow was created.
- Name
data.attributes.updated_atdatetime- Description
When the workflow was last updated.
- Name
data.attributes.email_templatesarray- Description
Email templates used in the workflow, each with id, subject, and stats.
- Name
data.attributes.triggersarray- Description
Entry points for the workflow.
- Name
data.attributes.triggers[].idstring- Description
Trigger identifier.
- Name
data.attributes.triggers[].typestring- Description
Trigger type, such as
simpleEventTrigger.
- Name
data.attributes.triggers[].namestring- Description
Trigger name.
- Name
data.attributes.triggers[].transitionsarray- Description
Next node ids. Linear steps use
{ "to": id }.
- Name
data.attributes.triggers[].configobject- Description
Trigger settings. Webhook URLs, headers, payloads, and API keys are never returned.
- Name
data.attributes.nodesarray- Description
Every step in the workflow.
- Name
data.attributes.nodes[].idstring- Description
Node identifier. Use this id with Get Workflow Stats.
- Name
data.attributes.nodes[].typestring- Description
Step type, such as
email_template,delay,true_falseV2,tag, orsequence.
- Name
data.attributes.nodes[].namestring- Description
Step name.
- Name
data.attributes.nodes[].transitionsarray- Description
Next node ids. Linear steps use
{ "to": id }. Branch steps use{ "true": id }and{ "false": id }. Other split types use their branch labels as keys.
- Name
data.attributes.nodes[].configobject- Description
Step settings. Webhook URLs, headers, payloads, and API keys are never returned.
- Name
data.attributes.nodes[].email_templateobject- Description
Present on email nodes. Includes
idandsubject. Fetch the body with the Email Templates API.
- Name
data.attributes.nodes[].sequenceobject- Description
Present on sequence nodes. Includes
idandname.
Get Workflow Stats
/v1/fetch/workflows/:id/statsReturns per-step entry counts and email stats for one workflow.
{ "error": "Invalid date range" }.Path Parameters
- Name
idstringRequired- Description
The workflow id from Get Workflows
Query Parameters
- Name
site_uuidstringRequired- Description
Your site's unique identifier
- Name
daysinteger- Description
Rolling window in days, ending now. Default 30. Max 366.
- Name
start_datestring- Description
Window start as
YYYY-MM-DD. Must be sent withend_date. Takes precedence overdays.
- Name
end_datestring- Description
Window end as
YYYY-MM-DD. Must be sent withstart_date. The range can be at most 366 days.
Response
Returns plain JSON, not JSON API. nodes is keyed by node id. Those ids match nodes[].id from Get Workflow.
- Name
workflow_idstring- Description
Workflow identifier.
- Name
window.startdatetime- Description
Start of the reporting window.
- Name
window.enddatetime- Description
End of the reporting window.
- Name
totals.node_entriesinteger- Description
Sum of entries across all steps.
- Name
nodesobject- Description
Per-step stats keyed by node id.
- Name
nodes.*.typestring- Description
Step type, such as
email_template,delay, orsequence.
- Name
nodes.*.enteredinteger- Description
How many times subscribers reached that step in the window.
- Name
nodes.*.emailobject- Description
Present on email nodes. Includes sent, opened, clicked, rates, unsubscribes, and unique events.
- Name
nodes.*.email.template_idinteger- Description
Email template id.
- Name
nodes.*.email.sentinteger- Description
Emails sent from this step.
- Name
nodes.*.email.openedinteger- Description
Emails opened from this step.
- Name
nodes.*.email.clickedinteger- Description
Emails clicked from this step.
- Name
nodes.*.email.open_ratenumber- Description
Open rate as a percentage, two decimals.
- Name
nodes.*.email.click_ratenumber- Description
Click rate as a percentage, two decimals.
- Name
nodes.*.email.unsubscribesinteger- Description
Unsubscribes attributed to that email.
- Name
nodes.*.email.unique_eventsinteger- Description
Conversions attributed to that email. This is the same number Email Viewer shows as Sales.
- Name
nodes.*.sequenceobject- Description
Present on sequence nodes. Same counts, summed across the sequence's emails.
- Name
nodes.*.sequence.sequence_idinteger- Description
Sequence id.
- Name
nodes.*.sequence.template_countinteger- Description
Number of emails in the sequence.
- Name
nodes.*.sequence.skippedboolean- Description
truewhen the sequence has more than 20 emails. In that case onlysequence_idandtemplate_countare returned.