Skip to content

Campaign Steps ​

Steps make up a campaign's sequence. Contacts move through the steps in position order.

Step types ​

typesettingsDescription
emailtemplate_id, or both subject and bodySends an email. Use {{first_name}}-style variables.
delaydelay_value (integer ≥ 1), delay_unit (minutes, hours, days, weeks)Waits before the next step
conditioncondition_type (opened, clicked, replied)Branches the sequence. Child steps set parent_step_id to this step and set branch to true or false.

The step object ​

json
{
  "id": 3,
  "campaign_id": 12,
  "type": "email",
  "position": 0,
  "settings": { "subject": "Hi {{first_name}}", "body": "<p>...</p>" },
  "created_at": "...",
  "updated_at": "..."
}

Endpoints ​

Each step is identified by {step}, the step's ID.

MethodPathPermissionDescription
GET/campaigns/{id}/stepscampaigns:readEvery step, sorted by position (not paginated)
POST/campaigns/{id}/stepscampaigns:writeAdd a step
POST/campaigns/{id}/steps/bulk-updatecampaigns:writeReplace the whole sequence
POST/campaigns/{id}/steps/reordercampaigns:writeChange the positions
GET/campaigns/{id}/steps/{step}campaigns:readGet a step
PUT/campaigns/{id}/steps/{step}campaigns:writeUpdate a step
DELETE/campaigns/{id}/steps/{step}campaigns:writeDelete a step. Returns 204, and the steps after it move up one position.

Add a step ​

json
{
  "type": "delay",
  "position": 1,
  "settings": { "delay_value": 2, "delay_unit": "days" }
}
FieldRules
typeRequired. email, delay or condition
positionInteger ≥ 0. Defaults to after the last step
parent_step_idA condition step in the same campaign
branchtrue or false: which outcome of the parent condition this step follows
settingsDepends on type. See step types.

201: { "data": Step }

Replace the sequence ​

POST /campaigns/{id}/steps/bulk-update

Deletes every existing step and creates the ones you send. Positions follow the array order, starting at 0.

json
{
  "steps": [
    { "type": "email", "settings": { "template_id": 7 } },
    { "type": "delay", "settings": { "delay_value": 3, "delay_unit": "days" } },
    { "type": "email", "settings": { "subject": "Follow-up", "body": "<p>...</p>" } }
  ]
}

201: { "data": [Step], "message": "Workflow created successfully", "count": 3 }

WARNING

Pause the campaign before you replace the steps of an active campaign.

Reorder ​

json
{ "steps": [ { "id": 5, "position": 0 }, { "id": 3, "position": 1 } ] }

200: { "data": { "message": "Steps reordered successfully" } }

Update a step ​

PUT /campaigns/{id}/steps/{step} takes the same fields as create, and every field is optional. When you send settings, it replaces the step's whole settings object.

API v1.0