Skip to content

Publish a sequence draft

$ lightfield sequence publish-draft
POST/v1/sequences/{id}/draft/publish

Publishes the open draft at expectedVersion and returns the sequence. A first publish leaves the sequence DEACTIVATED; activate it to start sending. Contacts already enrolled continue on the new version.

A refused publish changes nothing. Returns 400 invalid_configuration with the problems under issues, 400 permissions_not_granted or no_selectable_sender when the steps cannot send yet, 404 draft_not_found when no draft is open, and 409 when expectedVersion is not the open draft’s version; retrieve the draft and retry. See Sequence errors for what each code means and how to resolve it.

Required scope: sequences:update

Rate limit category: Write

ParametersExpand Collapse
--id: string

Unique identifier of the sequence.

--expected-version: string

The open draft’s version as last read.

ReturnsExpand Collapse
sequence_publish_draft_response: object { id, channels, createdAt, 8 more }
id: string

Unique identifier of the sequence.

channels: array of "EMAIL" or "LINKEDIN"

Channels the published steps send on; empty before the first publish.

"EMAIL"
"LINKEDIN"
createdAt: string

ISO 8601 creation timestamp.

definition: object { description, messaging, pacing, 3 more }

Published configuration, or null before the first publish.

description: string

What this version of the sequence is for.

messaging: object { callToAction, persona, trigger, valueProp }

Messaging inputs that frame every step.

callToAction: string

What the recipient is asked to do.

persona: string

Who the sequence targets.

trigger: string

Why the outreach is timely.

valueProp: string

The value proposition.

pacing: object { EMAIL, LINKEDIN_INVITE, LINKEDIN_MESSAGE }

How the whole sequence paces each step type it sends, keyed by sequence step type.

EMAIL: object { dailyLimit }

Email steps.

dailyLimit: number

Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

LINKEDIN_INVITE: object { dailyLimit }

LinkedIn connection requests.

dailyLimit: number

Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

LINKEDIN_MESSAGE: object { dailyLimit }

LinkedIn messages.

dailyLimit: number

Most sends of this step type across the whole sequence in any rolling 24 hours, or null when the sequence sets no daily cap. Workspace and sender limits still apply.

priority: "HIGH" or "NORMAL"

Send priority relative to other sequences.

"HIGH"
"NORMAL"
sendWindow: object { daysOfWeek, endHour, startHour, timezone }

When the sequence may send.

daysOfWeek: array of number

Days sends may go out, 0 = Sunday.

endHour: number

Local hour sends stop, exclusive (1–24).

startHour: number

First local hour sends may go out (0–23).

timezone: string

IANA timezone of the window.

steps: array of object { id, deliveryMode, mode, 3 more } or object { id, deliveryMode, includeNote, 4 more } or object { id, deliveryMode, mode, 3 more } or 3 more

Email, LinkedIn and wait steps in execution order.

union_member_0: object { id, deliveryMode, mode, 3 more }
id: string

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

deliveryMode: "AUTO" or "FOR_REVIEW"

AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.

"AUTO"
"FOR_REVIEW"
mode: "AGENT"

How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.

"AGENT"
name: string

Display name of the step.

prompt: string

Instructions the agent follows when composing this message.

type: "EMAIL" or "LINKEDIN_MESSAGE"

Step type.

"EMAIL"
"LINKEDIN_MESSAGE"
union_member_1: object { id, deliveryMode, includeNote, 4 more }
id: string

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

deliveryMode: "AUTO" or "FOR_REVIEW"

AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.

"AUTO"
"FOR_REVIEW"
includeNote: boolean

Whether the connection request carries a note. A step authored before this setting existed reads as true.

mode: "AGENT"

How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.

"AGENT"
name: string

Display name of the step.

prompt: string

Instructions the agent follows when composing this message.

type: "LINKEDIN_INVITE"

Step type.

"LINKEDIN_INVITE"
union_member_2: object { id, deliveryMode, mode, 3 more }
id: string

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

deliveryMode: "AUTO" or "FOR_REVIEW"

AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.

"AUTO"
"FOR_REVIEW"
mode: "TEMPLATE"

How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.

"TEMPLATE"
name: string

Display name of the step.

template: object { body, subject }

The email every contact receives.

body: string

Email body as Markdown, without the sign-off or signature, which are added when the message is written. Each {{ }} is a variable filled in per contact, with a fallback for a contact missing the value; a field variable names the field by the ad_ ID the field-definitions endpoints list.

subject: string

Plain-text subject line. Each {{ }} is a variable filled in per contact, with a fallback for a contact missing the value; a field variable names the field by the ad_ ID the field-definitions endpoints list.

type: "EMAIL"

Step type.

"EMAIL"
union_member_3: object { id, deliveryMode, mode, 3 more }
id: string

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

deliveryMode: "AUTO" or "FOR_REVIEW"

AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.

"AUTO"
"FOR_REVIEW"
mode: "TEMPLATE"

How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.

"TEMPLATE"
name: string

Display name of the step.

template: object { body }

The message every contact receives; for an invite, its connection note, sent only with includeNote.

body: string

Plain-text message. Each {{ }} is a variable filled in per contact, with a fallback for a contact missing the value; a field variable names the field by the ad_ ID the field-definitions endpoints list.

type: "LINKEDIN_MESSAGE"

Step type.

"LINKEDIN_MESSAGE"
union_member_4: object { id, deliveryMode, includeNote, 4 more }
id: string

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

deliveryMode: "AUTO" or "FOR_REVIEW"

AUTO sends without manual approval, subject to the send window and limits; FOR_REVIEW requires a person to approve the draft before sending.

"AUTO"
"FOR_REVIEW"
includeNote: boolean

Whether the connection request carries a note. A step authored before this setting existed reads as true.

mode: "TEMPLATE"

How each message is written: AGENT composes it from prompt; TEMPLATE sends template to every contact, with its variables filled in.

"TEMPLATE"
name: string

Display name of the step.

template: object { body }

The message every contact receives; for an invite, its connection note, sent only with includeNote.

body: string

Plain-text message. Each {{ }} is a variable filled in per contact, with a fallback for a contact missing the value; a field variable names the field by the ad_ ID the field-definitions endpoints list.

type: "LINKEDIN_INVITE"

Step type.

"LINKEDIN_INVITE"
union_member_5: object { id, duration, type, unit }
id: string

Step identifier.

duration: number

Length of the wait.

type: "WAIT" or "WAIT_FOR_CONNECTION"

WAIT pauses for a fixed time; WAIT_FOR_CONNECTION waits up to that long for a LinkedIn invite to be accepted.

"WAIT"
"WAIT_FOR_CONNECTION"
unit: "DAY" or "MINUTE"

Unit of duration.

"DAY"
"MINUTE"
firstActivatedAt: string

When the sequence was first activated.

lastActivatedAt: string

When the sequence was most recently activated.

name: string

Name of the sequence.

objectType: "sequence"

Always sequence.

"sequence"
reviewers: array of object { id, objectType }

Extra members who may approve this sequence’s FOR_REVIEW messages before they send. The sending member and the sequence’s creator always review, whether or not they are listed.

id: string

ID of the member.

objectType: "member"

Always member.

"member"
senders: array of object { id, objectType }

The senders this sequence sends from; new contacts rotate across them. An archived sender stays listed but never sends; any change to the list drops it.

id: string

ID of the sender.

objectType: "sender"

Always sender.

"sender"
status: "DRAFT" or "ACTIVE" or "DEACTIVATED"

DRAFT has not been published; ACTIVE is enabled for sending; DEACTIVATED is published but paused.

"DRAFT"
"ACTIVE"
"DEACTIVATED"

Publish a sequence draft

lightfield sequence publish-draft \
  --api-key 'My API Key' \
  --id id \
  --expected-version expectedVersion
{
  "id": "id",
  "channels": [
    "EMAIL"
  ],
  "createdAt": "createdAt",
  "definition": {
    "description": "description",
    "messaging": {
      "callToAction": "callToAction",
      "persona": "persona",
      "trigger": "trigger",
      "valueProp": "valueProp"
    },
    "pacing": {
      "EMAIL": {
        "dailyLimit": -9007199254740991
      },
      "LINKEDIN_INVITE": {
        "dailyLimit": -9007199254740991
      },
      "LINKEDIN_MESSAGE": {
        "dailyLimit": -9007199254740991
      }
    },
    "priority": "HIGH",
    "sendWindow": {
      "daysOfWeek": [
        -9007199254740991
      ],
      "endHour": -9007199254740991,
      "startHour": -9007199254740991,
      "timezone": "timezone"
    },
    "steps": [
      {
        "id": "id",
        "deliveryMode": "AUTO",
        "mode": "AGENT",
        "name": "name",
        "prompt": "prompt",
        "type": "EMAIL"
      }
    ]
  },
  "firstActivatedAt": "firstActivatedAt",
  "lastActivatedAt": "lastActivatedAt",
  "name": "name",
  "objectType": "sequence",
  "reviewers": [
    {
      "id": "x",
      "objectType": "member"
    }
  ],
  "senders": [
    {
      "id": "x",
      "objectType": "sender"
    }
  ],
  "status": "DRAFT"
}
Returns Examples
{
  "id": "id",
  "channels": [
    "EMAIL"
  ],
  "createdAt": "createdAt",
  "definition": {
    "description": "description",
    "messaging": {
      "callToAction": "callToAction",
      "persona": "persona",
      "trigger": "trigger",
      "valueProp": "valueProp"
    },
    "pacing": {
      "EMAIL": {
        "dailyLimit": -9007199254740991
      },
      "LINKEDIN_INVITE": {
        "dailyLimit": -9007199254740991
      },
      "LINKEDIN_MESSAGE": {
        "dailyLimit": -9007199254740991
      }
    },
    "priority": "HIGH",
    "sendWindow": {
      "daysOfWeek": [
        -9007199254740991
      ],
      "endHour": -9007199254740991,
      "startHour": -9007199254740991,
      "timezone": "timezone"
    },
    "steps": [
      {
        "id": "id",
        "deliveryMode": "AUTO",
        "mode": "AGENT",
        "name": "name",
        "prompt": "prompt",
        "type": "EMAIL"
      }
    ]
  },
  "firstActivatedAt": "firstActivatedAt",
  "lastActivatedAt": "lastActivatedAt",
  "name": "name",
  "objectType": "sequence",
  "reviewers": [
    {
      "id": "x",
      "objectType": "member"
    }
  ],
  "senders": [
    {
      "id": "x",
      "objectType": "sender"
    }
  ],
  "status": "DRAFT"
}