Sequences

Create Sequence Step Variant

POST /v1/sequences/{sequenceId}/steps/{stepId}/variants

POST/v1/sequences/{sequenceId}/steps/{stepId}/variants
POST
/v1/sequences/{sequenceId}/steps/{stepId}/variants

Add a new variant to an existing step

Append a variant to an existing step. Email steps support up to 26 variants (A/B…Z); other channels support a single active variant at a time.

The payload shape must match the step's channel — Email variants take { subject, content, preheader? }; LinkedIn Connection Request takes { connectionNote }; LinkedIn Message/InMail takes { message } (+ subject for InMail); ViewProfile, PostInteraction, Call, Task and Whatsapp steps accept . See OpenAPI.md.

Authorization

x-api-key<token>

API key for Open API authentication

In: header

Request Body

application/jsonRequired

typestring

Channel type of the variant. Must match the parent step. 1=Email, 2=LinkedInConnectionRequest, 3=LinkedInMessage, 4=LinkedInInMail, 5=LinkedInViewProfile, 6=LinkedInPostInteraction, 9=Task, 11=CallIntroduction, 12=CallDemo, 13=CallFollowUp, 14=CallReminder, 15=CallOther, 16=WhatsappMessage, 17=WhatsappVoiceMessage, 18=WhatsappVoiceCall.

Example: 1Value in: "Email" | "LinkedInConnectionRequest" | "LinkedInMessage" | "LinkedInInMail" | "LinkedInViewProfile" | "LinkedInPostInteration" | "Custom" | "CallIntroduction" | "CallDemo" | "CallFollowUp" | "CallReminder" | "CallOther" | "WhatsappMessage" | "WhatsappVoiceMessage" | "WhatsappVoiceCall"

payloadobject

Payload for the variant. Shape depends on the channel:

  • Email (type=1): &#123; subject, content, preheader? &#125;
  • LinkedInConnectionRequest (type=2): &#123; connectionNote &#125;
  • LinkedInMessage (type=3): &#123; message &#125;
  • LinkedInInMail (type=4): &#123; subject, message &#125;
  • ViewProfile/PostInteraction/Task/Call/Whatsapp: {} (empty object)

See OpenAPI.md.

Example: {"subject":"Following up, {{firstName}}","content":"<p>Hi {{firstName}},</p><p>Wanted to follow up on my last email.</p>","preheader":"Following up"}

attachmentIdsarray<string>

Hashed IDs of attachments to include (Email variants only). Upload via POST /v1/attachments to obtain an ID.

Example: ["lN5xKp2vJq"]

taskNotestring

Task note for the generated task. NOT allowed on Email variants (type=1) — edge rejects it because Email is automated, not task-based. Use for LinkedIn / Call / Task / WhatsApp channels.

Example: "Follow up within 24 hours if no reply"Maximum length: 3000

absoluteDaysnumber

Override day number for this variant. Defaults to the step's absoluteDays.

Example: 3Minimum: 1

assigneeIdstring

Hashed user ID to assign generated tasks to (task-based channels). Defaults to the sequence owner.

Example: "z6R8Mw4vBn"

prioritystring

Task priority (1=Urgent, 2=High, 3=Normal, 4=Low). Used when the channel generates a task.

Example: 3Value in: "Urgent" | "High" | "Normal" | "Low"

Path Parameters

sequenceIdstring

The ID of the sequence

stepIdstring

The ID of the step

Responses

201
Sequence step variant created

Request

curl -X POST \
  "https://open-api.saleshandy.com/v1/sequences/{sequenceId}/steps/{stepId}/variants" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": 1,
  "payload": {
    "subject": "Following up, {{firstName}}",
    "content": "<p>Hi {{firstName}},</p><p>Wanted to follow up on my last email.</p>",
    "preheader": "Following up"
  },
  "attachmentIds": [
    "lN5xKp2vJq"
  ],
  "taskNote": "Follow up within 24 hours if no reply",
  "absoluteDays": 3,
  "assigneeId": "z6R8Mw4vBn",
  "priority": 3
}'

Response

No response body