## 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](/using-the-api/scopes/):** `sequences:update`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Parameters

- `id: str`

  Unique identifier of the sequence.

- `body: Optional[Body]`

### Returns

- `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.

    - `"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.

      - `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.

      - `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.

    - `priority: Literal["HIGH", "NORMAL"]`

      Send priority relative to other sequences.

      - `"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).

      - `start_hour: int`

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

      - `timezone: str`

        IANA timezone of the window.

    - `steps: List[DefinitionStep]`

      Email, LinkedIn and wait steps in execution order.

      - `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.

          - `"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.

          - `"AGENT"`

        - `name: str`

          Display name of the step.

        - `prompt: str`

          Instructions the agent follows when composing this message.

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

          Step type.

          - `"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.

          - `"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.

          - `"AGENT"`

        - `name: str`

          Display name of the step.

        - `prompt: str`

          Instructions the agent follows when composing this message.

        - `type: Literal["LINKEDIN_INVITE"]`

          Step type.

          - `"LINKEDIN_INVITE"`

      - `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.

          - `"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.

          - `"TEMPLATE"`

        - `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.

          - `"EMAIL"`

      - `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.

          - `"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.

          - `"TEMPLATE"`

        - `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.

          - `"LINKEDIN_MESSAGE"`

      - `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.

          - `"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.

          - `"TEMPLATE"`

        - `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.

          - `"LINKEDIN_INVITE"`

      - `class DefinitionStepUnionMember5: …`

        - `id: str`

          Step identifier.

        - `duration: int`

          Length of the wait.

        - `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.

          - `"WAIT"`

          - `"WAIT_FOR_CONNECTION"`

        - `unit: Literal["DAY", "MINUTE"]`

          Unit of `duration`.

          - `"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`.

    - `"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.

    - `object_type: Literal["member"]`

      Always `member`.

      - `"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.

    - `object_type: Literal["sender"]`

      Always `sender`.

      - `"sender"`

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

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

    - `"DRAFT"`

    - `"ACTIVE"`

    - `"DEACTIVATED"`

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
sequence_deactivate_response = client.sequence.deactivate(
    id="id",
)
print(sequence_deactivate_response.id)
```

#### Response

```json
{
  "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"
}
```
