Skip to main content
POST

Quick note before you begin

  • Creates a new workflow automation. By default the workflow is created in draft status. Pass active: true to validate and activate it as part of the create call.
  • A workflow runs steps in order. Without branch steps, steps must strictly alternate wait → email, starting with wait and ending with email. Workflows containing branch steps use a more flexible graph (each step references the next via nextStepId).
  • Every email step must be preceded by a wait step, including email steps inside a branch. Set the wait delay to { "value": 0, "unit": "mins" } if you want the email to send immediately.

Authorizations

string | header
required
Project API key header of the form Bearer AS_<key>.

Body

string
required
Display name for the workflow automation.Maximum length: 255Example: "Welcome Series"
string
Optional description.Maximum length: 1000
object
Defines which contacts enter the workflow.
object
Defines when contacts leave the workflow before completion.
object[]
Ordered steps that contacts walk through. Each step must include a type. Linear workflows alternate wait and email; workflows containing a branch step form a graph where each step references the next via nextStepId. Every email step must be preceded by a wait step (use a delay of 0 to send immediately), including email steps inside a branch.

Branch step example

A branch step splits the workflow into multiple paths based on filterCriteria. Each branch points at its first step via nextStepId, and steps inside the branch reference back via parentBranchStepId and parentBranchId. Branches can rejoin the main flow at a shared mergeStepId.
Branch step
Wait step inside a branch
Email step inside a branch
In an email step you can pass templateId to reference an existing template instead of inlining htmlTemplate and subject.
string[]
Optional tags for filtering and organization.
string
Suppression group applied to all email steps in the workflow.
boolean
Whether to insert open-tracking pixels into emails sent by this workflow.
boolean
Whether to rewrite links for click tracking in emails sent by this workflow.
boolean
When true, the workflow is validated and activated as part of the create call. When false or omitted, the workflow is created in draft status and must be activated separately.

Response

Workflow automation created successfully (201)
boolean
Example: true
object
The created workflow automation.

Error Responses

object
Returned when the request body fails validation. Common codes include NAME_REQUIRED, INVALID_STEP_SEQUENCE, EMAIL_TEMPLATE_REQUIRED, BRANCH_BRANCHES_REQUIRED, EVENT_NAME_REQUIRED.
object
Returned when active: true is sent but the workflow is missing required fields for activation.