Update a sequence
Edit a sequence: its name, its workflow, or its shape.
PATCH/api/v1/sequences/{id}
Parameters
Path
| Name | In | Description |
|---|---|---|
idrequired | path | The record's id. |
Body
A JSON object. Fields not listed are ignored.
| Name | In | Description |
|---|---|---|
name | body | Sequence name. |
workflow | body, object | The 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. |
draft | body, boolean | Create: 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. |
Example
curl
curl -X PATCH "https://crm.ashwanth.dev/api/v1/sequences/{id}" \
-H "Authorization: Bearer $SALES_ENGINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "",
"workflow": {},
"draft": false
}'CLI
sales-engine sequences update <id>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.
Path
requiredThe record's id.
Every documented field is listed above; leave out the ones you do not need.
Request
PATCH /api/v1/sequences/%7Bid%7D
Fill the path first.