Skip to main content
POST
Add a sequence step

Authorizations

Authorization
string
header
required

Your API token (af_…) as the Basic-auth username, with an empty password.

Path Parameters

campaignId
string
required

The campaign's id (24-character hex ObjectId), as returned by POST /business/campaigns or as the campaignId of a GET /business/campaigns row.

Body

application/json
channel
enum<string>
required

Step channel: email, linkedin_connection (connection request), linkedin_message (message to an accepted connection), linkedin_visit (profile visit, no content), linkedin_like (reaction to a recent post, no content), inmail (LinkedIn InMail, consumes InMail credits), dialer (phone-call task for a rep), todo (free-form human task) or condition (a branch point: it waits for conditionType and routes each lead down its yes or no lane; an ab_split routes each lead at once down arm a or arm b, by a fixed hash of the lead and the split, in the weights' proportions). A linkedin_connection step cannot come after a linkedin_message step (422 STEP_ORDER_INVALID).

Available options:
email,
linkedin_connection,
linkedin_message,
linkedin_visit,
linkedin_like,
inmail,
dialer,
todo,
condition
sequenceNumber
integer
required

The step's 0-based slot within its list: the main sequence, or the lane named by parentStepId and branchKey. The slot must be free (409 STEP_POSITION_TAKEN), so send the list's length to append; the one taken slot accepted is that of the list's closing condition, which adds the step just before it. A condition step is always appended to its list, and nothing can be placed after a list's closing condition (422 CONDITION_NOT_LAST_IN_LIST).

Required range: 0 <= x <= 50
daysBetween
integer
required

Whole days to wait after the previous step (or after the campaign start for the first step) before this one is due, 0-90. On a condition step it is the window instead: how many days, 1-30, the condition waits for its signal before routing the lead down the no lane. An ab_split never waits: send 0.

Required range: 0 <= x <= 90
type
enum<string>
default:manual

manual (default) sends your subject/body as written; ai_generated writes a topic and title with AI at creation and renders each message per lead at send time (send no topic; it is generated); ai_reply is an AI-drafted reply that waits for approval and needs a topic. A condition step is always manual.

Available options:
manual,
ai_generated,
ai_reply
subject
string

Subject line for a manual step (up to 500 characters, may be empty); becomes the step title. Rejected on linkedin_visit, linkedin_like and condition steps, which carry no message.

Maximum string length: 500
body
any

Message body for a manual step (up to 20000 characters; {Variable} tokens and spintax substitute at send time). On a linkedin_connection step this is the invitation note, capped at LinkedIn's 200-character limit. Rejected on linkedin_visit, linkedin_like and condition steps, which carry no message.

topic
string

Free text: what this step should say, in your own words — there is no fixed set of topics. 1-500 characters. Required for ai_reply, rejected for ai_generated (which generates its own) and for linkedin_visit / linkedin_like / condition steps. Stored but not rendered on a manual step.

Required string length: 1 - 500
cc
string<email>[]

Accepted values: bare email addresses such as ops@example.com — a display name or angle brackets is rejected, up to 320 characters each. Every address you list is copied on every send of this step, up to 10 addresses. Only an email step actually sends them: on any other channel the value is stored and never used.

Maximum array length: 10

A bare email address, up to 320 characters.

Maximum string length: 320
parentStepId
string | null

The id of the condition step whose lane this step goes into. Omit (or null) for the main sequence. Sent together with branchKey.

branchKey
enum<string> | null

Which lane of parentStepId: yes (the condition's signal arrived in time) or no; under an ab_split, the arm a or b (422 LANE_BRANCH_KEY_INVALID otherwise). Sent together with parentStepId.

Available options:
yes,
no,
a,
b,
null
conditionType
enum<string>

Condition steps only, and required on them: invite_accepted waits for the invite of the nearest earlier linkedin_connection step on the lead's path to be accepted; clicked_link waits for a click on a link in the nearest earlier email step on the path; ab_split waits for nothing and sends each lead down arm a or arm b in the splitArms weights' proportions (a fixed hash of the lead and the split, so a lead keeps its arm), and may be the first step. Conditions can only be added before the campaign starts (409 SEQUENCE_STRUCTURE_LOCKED).

Available options:
invite_accepted,
clicked_link,
ab_split
splitArms
object[]

ab_split steps only: both arms, a then b, each { key, label?, weight }, with whole-percent weights adding up to 100. Omitted means a and b at 50 each. An arm may stay empty to hold leads out.

Response

Success

step
object
required