Workflows

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

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, or deleted. 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

GET/v1/fetch/workflows

Returns 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

GET/v1/fetch/workflows/:id

Returns one workflow with its full structure. Use the workflow id from Get Workflows, such as flow_abc123.

A workflow that is not in your site returns 404.
Canvas annotations such as notes and boxes are not returned.

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, or deleted.

  • 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, or sequence.

  • 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 id and subject. Fetch the body with the Email Templates API.

  • Name
    data.attributes.nodes[].sequenceobject
    Description

    Present on sequence nodes. Includes id and name.


Get Workflow Stats

GET/v1/fetch/workflows/:id/stats

Returns per-step entry counts and email stats for one workflow.

Call Get Workflow first to map node ids to step names and order. Then call Get Workflow Stats to read the funnel.
Results are cached for about 10 minutes.
Invalid dates return 422 with { "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 with end_date. Takes precedence over days.

  • Name
    end_datestring
    Description

    Window end as YYYY-MM-DD. Must be sent with start_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, or sequence.

  • 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

    true when the sequence has more than 20 emails. In that case only sequence_id and template_count are returned.