Skip to content

Deactivate a sequence

sequence.deactivate(strid, SequenceDeactivateParams**kwargs) -> SequenceDeactivateResponse
POST/v1/sequences/{id}/deactivate

Pauses sending for a published sequence and returns it. Enrollments stay in place and resume when the sequence is activated again; a paused sequence is returned unchanged. The sequence’s status changes immediately; its enrollments’ statuses follow asynchronously. Returns 400 sequence_not_published before the first publish, and 409 when the sequence changed while the request ran: re-read it to see the change, then retry.

Required scope: sequences:update

Rate limit category: Write

ParametersExpand Collapse
id: str

Unique identifier of the sequence.

body: Optional[Body]
ReturnsExpand Collapse
class SequenceDeactivateResponse: …
id: str

Unique identifier of the sequence.

channels: List[Literal["EMAIL", "LINKEDIN"]]

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

One of the following:
"EMAIL"
"LINKEDIN"
created_at: str

ISO 8601 creation timestamp.

definition: Optional[Definition]

Published configuration, or null before the first publish.

description: str

What this version of the sequence is for.

messaging: DefinitionMessaging

Messaging inputs that frame every step.

call_to_action: Optional[str]

What the recipient is asked to do.

persona: Optional[str]

Who the sequence targets.

trigger: Optional[str]

Why the outreach is timely.

value_prop: Optional[str]

The value proposition.

pacing: DefinitionPacing

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

email: DefinitionPacingEmail

Email steps.

daily_limit: Optional[int]

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.

minimum-9007199254740991
maximum9007199254740991
linkedin_invite: DefinitionPacingLinkedinInvite

LinkedIn connection requests.

daily_limit: Optional[int]

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.

minimum-9007199254740991
maximum9007199254740991
linkedin_message: DefinitionPacingLinkedinMessage

LinkedIn messages.

daily_limit: Optional[int]

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.

minimum-9007199254740991
maximum9007199254740991
priority: Literal["HIGH", "NORMAL"]

Send priority relative to other sequences.

One of the following:
"HIGH"
"NORMAL"
send_window: DefinitionSendWindow

When the sequence may send.

days_of_week: List[int]

Days sends may go out, 0 = Sunday.

end_hour: int

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

minimum-9007199254740991
maximum9007199254740991
start_hour: int

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

minimum-9007199254740991
maximum9007199254740991
timezone: str

IANA timezone of the window.

steps: List[DefinitionStep]

Email, LinkedIn and wait steps in execution order.

One of the following:
class DefinitionStepUnionMember0: …
id: str

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

delivery_mode: Literal["AUTO", "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.

One of the following:
"AUTO"
"FOR_REVIEW"
mode: Literal["AGENT"]

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

name: str

Display name of the step.

prompt: str

Instructions the agent follows when composing this message.

type: Literal["EMAIL", "LINKEDIN_MESSAGE"]

Step type.

One of the following:
"EMAIL"
"LINKEDIN_MESSAGE"
class DefinitionStepUnionMember1: …
id: str

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

delivery_mode: Literal["AUTO", "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.

One of the following:
"AUTO"
"FOR_REVIEW"
include_note: bool

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

mode: Literal["AGENT"]

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

name: str

Display name of the step.

prompt: str

Instructions the agent follows when composing this message.

type: Literal["LINKEDIN_INVITE"]

Step type.

class DefinitionStepUnionMember2: …
id: str

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

delivery_mode: Literal["AUTO", "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.

One of the following:
"AUTO"
"FOR_REVIEW"
mode: Literal["TEMPLATE"]

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

name: str

Display name of the step.

template: DefinitionStepUnionMember2Template

The email every contact receives.

body: str

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: str

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: Literal["EMAIL"]

Step type.

class DefinitionStepUnionMember3: …
id: str

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

delivery_mode: Literal["AUTO", "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.

One of the following:
"AUTO"
"FOR_REVIEW"
mode: Literal["TEMPLATE"]

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

name: str

Display name of the step.

template: DefinitionStepUnionMember3Template

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

body: str

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: Literal["LINKEDIN_MESSAGE"]

Step type.

class DefinitionStepUnionMember4: …
id: str

Step identifier, referenced by enrollment currentStepId and message sequenceStepId.

delivery_mode: Literal["AUTO", "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.

One of the following:
"AUTO"
"FOR_REVIEW"
include_note: bool

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

mode: Literal["TEMPLATE"]

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

name: str

Display name of the step.

template: DefinitionStepUnionMember4Template

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

body: str

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: Literal["LINKEDIN_INVITE"]

Step type.

class DefinitionStepUnionMember5: …
id: str

Step identifier.

duration: int

Length of the wait.

minimum-9007199254740991
maximum9007199254740991
type: Literal["WAIT", "WAIT_FOR_CONNECTION"]

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

One of the following:
"WAIT"
"WAIT_FOR_CONNECTION"
unit: Literal["DAY", "MINUTE"]

Unit of duration.

One of the following:
"DAY"
"MINUTE"
first_activated_at: Optional[str]

When the sequence was first activated.

last_activated_at: Optional[str]

When the sequence was most recently activated.

name: str

Name of the sequence.

object_type: Literal["sequence"]

Always sequence.

reviewers: List[Reviewer]

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: str

ID of the member.

minLength1
object_type: Literal["member"]

Always member.

senders: List[Sender]

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: str

ID of the sender.

minLength1
object_type: Literal["sender"]

Always sender.

status: Literal["DRAFT", "ACTIVE", "DEACTIVATED"]

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

One of the following:
"DRAFT"
"ACTIVE"
"DEACTIVATED"

Deactivate a sequence

from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
sequence_deactivate_response = client.sequence.deactivate(
    id="id",
)
print(sequence_deactivate_response.id)
{
  "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"
}