Sales Engine
API documentation
SequencesOperation sequences.create

Create a sequence

Save a reusable sequence shape. The user chooses every step and gap; nothing is derived.

POST/api/v1/sequences
Scope write: Create and edit lists, research, sequences, campaigns, memory, signals and learning; queue jobs.

Parameters

Body

A JSON object, required. Fields not listed are ignored.

NameInDescription
namerequiredbodySequence name.
descriptionbodyWhat it is for.
goalbodyWhat a reply should lead to.
cadence_textbodyCadence in plain English.
workflowbody, objectThe sequence as a workflow: { nodes, edges }. Nodes are start, email (purpose, notes, html, thread reply or new, variants, reply_intent), wait (days), if (rules: [{ id, label?, all: [{ check: opened or clicked, is: true or false }] }], checked in order, an edge per rule id plus else for Otherwise; an older if with check alone has Yes and No edges), reply (categories: interested, meeting_request, information_request, not_interested, out_of_office, contact_later, wrong_person, uncategorizable; one edge per category), action (set_stage or notify) and end. Edges leave by sourceHandle next, yes, no, reply or a reply category; an unsubscribe always stops the lead and is never a branch; a way out left unconnected ends the lead's path. Any step but start and end may carry label (its own name, up to 60 characters); a reply node may carry vertical: true (drawn as a tall box). A runnable workflow sets the steps and days; a half-drawn one is saved as drawn and its problems come back as workflow_issues.
draftbody, booleanCreate: true saves a half-built workflow as a draft. Update: false finishes a draft (its workflow must run). A draft cannot go into a campaign.
total_stepsrequiredbody, integerNumber of emails in the sequence, 1 to 10.
day_offsetsrequiredbody, arrayDay of each step counted from launch, one integer per step, the first is 0.
ab_enabledbody, booleanWrite A/B variants.
variants_countbody, integerVariants per step, 1 to 3.
generation_modebodypersonalized writes every lead its own copy; template writes one email per step with a {{hook}} slot. One of personalized, template.
use_htmlbody, booleanSend HTML instead of plain text.
cta_policybodyreply_only or link_allowed. One of reply_only, link_allowed.
word_ceilingbody, integerTarget words per email, 40 to 400 (120 by default); the writer goes shorter or longer when the copy needs it, and only a body half again over is flagged.
thread_followupsbody, booleanFollow-ups reply in the same thread.
stepsbody, arrayPer-step purpose and notes: [{step_number, purpose, notes}]; purpose is opener, new_angle, question, proof, dissatisfaction, breakup or custom.

Example

curl
curl -X POST "https://crm.ashwanth.dev/api/v1/sequences" \
  -H "Authorization: Bearer $SALES_ENGINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "",
  "total_steps": 0,
  "day_offsets": [],
  "description": "",
  "goal": "",
  "cadence_text": "",
  "workflow": {},
  "draft": false,
  "ab_enabled": false,
  "variants_count": 0,
  "generation_mode": "personalized",
  "use_html": false,
  "cta_policy": "reply_only",
  "word_ceiling": 0,
  "thread_followups": false,
  "steps": []
}'
CLI
sales-engine sequences create --name "..." --total-steps 1 --day-offsets '[]'

The JSON above lists every documented field with a typed placeholder; send only the ones you mean.

Response

A 200 with the result under data, on creation too. Errors come back as an error object with a stable code; see Errors.

Shape
{
  "data": { ... }
}

Run it below to see the live shape for your workspace.

Try it

Runs against this server, as the workspace behind the key.
Kept in this page while you browse the docs, gone on reload, never stored. Signed in to the app? Leave it blank and the call runs as you.
Every documented field is listed above; leave out the ones you do not need.
Request
POST /api/v1/sequences

Also in Sequences