# Sequence

## List sequences

`client.Sequence.List(ctx, query) (*SequenceListResponse, error)`

**get** `/v1/sequences`

Returns a paginated list of sequences, including ones that have never been published. Results are sorted by when the sequence was created (`createdAt`), newest first. Use `offset` and `limit` to paginate through results, and bracketed filters to narrow the list. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.

Supported filters: `status[equal]` (DRAFT, ACTIVE, DEACTIVATED), `channels[contains]` (EMAIL, LINKEDIN), and `createdAt`, `firstActivatedAt` or `lastActivatedAt` with `[greaterThanOrEqual]` or `[lessThanOrEqual]` (ISO 8601 timestamps with a timezone). Filters are combined with AND.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `query SequenceListParams`

  - `Limit param.Field[int64]`

    Maximum number of records to return. Defaults to 25, maximum 25.

  - `Offset param.Field[int64]`

    Number of records to skip for pagination. Defaults to 0.

### Returns

- `type SequenceListResponse struct{…}`

  - `Data []SequenceListResponseData`

    - `ID string`

      Unique identifier of the sequence.

    - `Channels []string`

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

      - `const SequenceListResponseDataChannelEmail SequenceListResponseDataChannel = "EMAIL"`

      - `const SequenceListResponseDataChannelLinkedin SequenceListResponseDataChannel = "LINKEDIN"`

    - `CreatedAt string`

      ISO 8601 creation timestamp.

    - `Definition SequenceListResponseDataDefinition`

      Published configuration, or null before the first publish.

      - `Description string`

        What this version of the sequence is for.

      - `Messaging SequenceListResponseDataDefinitionMessaging`

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

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

        - `Email SequenceListResponseDataDefinitionPacingEmail`

          Email steps.

          - `DailyLimit int64`

            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.

        - `LinkedinInvite SequenceListResponseDataDefinitionPacingLinkedinInvite`

          LinkedIn connection requests.

          - `DailyLimit int64`

            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.

        - `LinkedinMessage SequenceListResponseDataDefinitionPacingLinkedinMessage`

          LinkedIn messages.

          - `DailyLimit int64`

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

        Send priority relative to other sequences.

        - `const SequenceListResponseDataDefinitionPriorityHigh SequenceListResponseDataDefinitionPriority = "HIGH"`

        - `const SequenceListResponseDataDefinitionPriorityNormal SequenceListResponseDataDefinitionPriority = "NORMAL"`

      - `SendWindow SequenceListResponseDataDefinitionSendWindow`

        When the sequence may send.

        - `DaysOfWeek []int64`

          Days sends may go out, 0 = Sunday.

        - `EndHour int64`

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

        - `StartHour int64`

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

        - `Timezone string`

          IANA timezone of the window.

      - `Steps []SequenceListResponseDataDefinitionStepUnion`

        Email, LinkedIn and wait steps in execution order.

        - `type SequenceListResponseDataDefinitionStepObject struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObjectDeliveryModeAuto SequenceListResponseDataDefinitionStepObjectDeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObjectDeliveryModeForReview SequenceListResponseDataDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObjectModeAgent SequenceListResponseDataDefinitionStepObjectMode = "AGENT"`

          - `Name string`

            Display name of the step.

          - `Prompt string`

            Instructions the agent follows when composing this message.

          - `Type string`

            Step type.

            - `const SequenceListResponseDataDefinitionStepObjectTypeEmail SequenceListResponseDataDefinitionStepObjectType = "EMAIL"`

            - `const SequenceListResponseDataDefinitionStepObjectTypeLinkedinMessage SequenceListResponseDataDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

        - `type SequenceListResponseDataDefinitionStepObject2 struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObject2DeliveryModeAuto SequenceListResponseDataDefinitionStepObject2DeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObject2DeliveryModeForReview SequenceListResponseDataDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

          - `IncludeNote bool`

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

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObject2ModeAgent SequenceListResponseDataDefinitionStepObject2Mode = "AGENT"`

          - `Name string`

            Display name of the step.

          - `Prompt string`

            Instructions the agent follows when composing this message.

          - `Type string`

            Step type.

            - `const SequenceListResponseDataDefinitionStepObject2TypeLinkedinInvite SequenceListResponseDataDefinitionStepObject2Type = "LINKEDIN_INVITE"`

        - `type SequenceListResponseDataDefinitionStepObject3 struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObject3DeliveryModeAuto SequenceListResponseDataDefinitionStepObject3DeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObject3DeliveryModeForReview SequenceListResponseDataDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObject3ModeTemplate SequenceListResponseDataDefinitionStepObject3Mode = "TEMPLATE"`

          - `Name string`

            Display name of the step.

          - `Template SequenceListResponseDataDefinitionStepObject3Template`

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

            Step type.

            - `const SequenceListResponseDataDefinitionStepObject3TypeEmail SequenceListResponseDataDefinitionStepObject3Type = "EMAIL"`

        - `type SequenceListResponseDataDefinitionStepObject4 struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObject4DeliveryModeAuto SequenceListResponseDataDefinitionStepObject4DeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObject4DeliveryModeForReview SequenceListResponseDataDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObject4ModeTemplate SequenceListResponseDataDefinitionStepObject4Mode = "TEMPLATE"`

          - `Name string`

            Display name of the step.

          - `Template SequenceListResponseDataDefinitionStepObject4Template`

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

            Step type.

            - `const SequenceListResponseDataDefinitionStepObject4TypeLinkedinMessage SequenceListResponseDataDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

        - `type SequenceListResponseDataDefinitionStepObject5 struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObject5DeliveryModeAuto SequenceListResponseDataDefinitionStepObject5DeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObject5DeliveryModeForReview SequenceListResponseDataDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

          - `IncludeNote bool`

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

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObject5ModeTemplate SequenceListResponseDataDefinitionStepObject5Mode = "TEMPLATE"`

          - `Name string`

            Display name of the step.

          - `Template SequenceListResponseDataDefinitionStepObject5Template`

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

            Step type.

            - `const SequenceListResponseDataDefinitionStepObject5TypeLinkedinInvite SequenceListResponseDataDefinitionStepObject5Type = "LINKEDIN_INVITE"`

        - `type SequenceListResponseDataDefinitionStepObject6 struct{…}`

          - `ID string`

            Step identifier.

          - `Duration int64`

            Length of the wait.

          - `Type string`

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

            - `const SequenceListResponseDataDefinitionStepObject6TypeWait SequenceListResponseDataDefinitionStepObject6Type = "WAIT"`

            - `const SequenceListResponseDataDefinitionStepObject6TypeWaitForConnection SequenceListResponseDataDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

          - `Unit string`

            Unit of `duration`.

            - `const SequenceListResponseDataDefinitionStepObject6UnitDay SequenceListResponseDataDefinitionStepObject6Unit = "DAY"`

            - `const SequenceListResponseDataDefinitionStepObject6UnitMinute SequenceListResponseDataDefinitionStepObject6Unit = "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 string`

      Always `sequence`.

      - `const SequenceListResponseDataObjectTypeSequence SequenceListResponseDataObjectType = "sequence"`

    - `Reviewers []SequenceListResponseDataReviewer`

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

        Always `member`.

        - `const SequenceListResponseDataReviewerObjectTypeMember SequenceListResponseDataReviewerObjectType = "member"`

    - `Senders []SequenceListResponseDataSender`

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

        Always `sender`.

        - `const SequenceListResponseDataSenderObjectTypeSender SequenceListResponseDataSenderObjectType = "sender"`

    - `Status string`

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

      - `const SequenceListResponseDataStatusDraft SequenceListResponseDataStatus = "DRAFT"`

      - `const SequenceListResponseDataStatusActive SequenceListResponseDataStatus = "ACTIVE"`

      - `const SequenceListResponseDataStatusDeactivated SequenceListResponseDataStatus = "DEACTIVATED"`

  - `Object SequenceListResponseObject`

    - `const SequenceListResponseObjectList SequenceListResponseObject = "list"`

  - `TotalCount int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceListResponse, err := client.Sequence.List(context.TODO(), githubcomlightfldlightfieldgo.SequenceListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceListResponse.Data)
}
```

#### Response

```json
{
  "data": [
    {
      "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"
    }
  ],
  "object": "list",
  "totalCount": -9007199254740991
}
```

## Retrieve a sequence

`client.Sequence.Get(ctx, id) (*SequenceRetrieveResponse, error)`

**get** `/v1/sequences/{id}`

Retrieves a single sequence by its ID. Edits that have not been published are not included; those can be read with [Retrieve a sequence draft](/api/resources/sequence/methods/retrieveDraft).

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `id string`

  Unique identifier of the sequence to retrieve.

### Returns

- `type SequenceRetrieveResponse struct{…}`

  - `ID string`

    Unique identifier of the sequence.

  - `Channels []string`

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

    - `const SequenceRetrieveResponseChannelEmail SequenceRetrieveResponseChannel = "EMAIL"`

    - `const SequenceRetrieveResponseChannelLinkedin SequenceRetrieveResponseChannel = "LINKEDIN"`

  - `CreatedAt string`

    ISO 8601 creation timestamp.

  - `Definition SequenceRetrieveResponseDefinition`

    Published configuration, or null before the first publish.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceRetrieveResponseDefinitionMessaging`

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

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

      - `Email SequenceRetrieveResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceRetrieveResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceRetrieveResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceRetrieveResponseDefinitionPriorityHigh SequenceRetrieveResponseDefinitionPriority = "HIGH"`

      - `const SequenceRetrieveResponseDefinitionPriorityNormal SequenceRetrieveResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceRetrieveResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceRetrieveResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceRetrieveResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObjectDeliveryModeAuto SequenceRetrieveResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObjectDeliveryModeForReview SequenceRetrieveResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObjectModeAgent SequenceRetrieveResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObjectTypeEmail SequenceRetrieveResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceRetrieveResponseDefinitionStepObjectTypeLinkedinMessage SequenceRetrieveResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceRetrieveResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject2DeliveryModeAuto SequenceRetrieveResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObject2DeliveryModeForReview SequenceRetrieveResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject2ModeAgent SequenceRetrieveResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObject2TypeLinkedinInvite SequenceRetrieveResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceRetrieveResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject3DeliveryModeAuto SequenceRetrieveResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObject3DeliveryModeForReview SequenceRetrieveResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject3ModeTemplate SequenceRetrieveResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObject3TypeEmail SequenceRetrieveResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceRetrieveResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject4DeliveryModeAuto SequenceRetrieveResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObject4DeliveryModeForReview SequenceRetrieveResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject4ModeTemplate SequenceRetrieveResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObject4TypeLinkedinMessage SequenceRetrieveResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceRetrieveResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject5DeliveryModeAuto SequenceRetrieveResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObject5DeliveryModeForReview SequenceRetrieveResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject5ModeTemplate SequenceRetrieveResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObject5TypeLinkedinInvite SequenceRetrieveResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceRetrieveResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject6TypeWait SequenceRetrieveResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceRetrieveResponseDefinitionStepObject6TypeWaitForConnection SequenceRetrieveResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceRetrieveResponseDefinitionStepObject6UnitDay SequenceRetrieveResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceRetrieveResponseDefinitionStepObject6UnitMinute SequenceRetrieveResponseDefinitionStepObject6Unit = "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 SequenceRetrieveResponseObjectType`

    Always `sequence`.

    - `const SequenceRetrieveResponseObjectTypeSequence SequenceRetrieveResponseObjectType = "sequence"`

  - `Reviewers []SequenceRetrieveResponseReviewer`

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

      Always `member`.

      - `const SequenceRetrieveResponseReviewerObjectTypeMember SequenceRetrieveResponseReviewerObjectType = "member"`

  - `Senders []SequenceRetrieveResponseSender`

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

      Always `sender`.

      - `const SequenceRetrieveResponseSenderObjectTypeSender SequenceRetrieveResponseSenderObjectType = "sender"`

  - `Status SequenceRetrieveResponseStatus`

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

    - `const SequenceRetrieveResponseStatusDraft SequenceRetrieveResponseStatus = "DRAFT"`

    - `const SequenceRetrieveResponseStatusActive SequenceRetrieveResponseStatus = "ACTIVE"`

    - `const SequenceRetrieveResponseStatusDeactivated SequenceRetrieveResponseStatus = "DEACTIVATED"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceRetrieveResponse, err := client.Sequence.Get(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceRetrieveResponse.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"
}
```

## Retrieve sequence performance

`client.Sequence.GetPerformance(ctx, id) (*SequenceRetrievePerformanceResponse, error)`

**get** `/v1/sequences/{id}/performance`

Retrieves a sequence’s lifetime engagement, totalled by step type and broken down per step, with the live enrollments currently on each step. Test runs are not counted. A sequence that has never been published reports zero counts and no steps.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

### Returns

- `type SequenceRetrievePerformanceResponse struct{…}`

  - `ByStepType SequenceRetrievePerformanceResponseByStepType`

    Lifetime totals for each step type, across all of its steps.

    - `Email SequenceRetrievePerformanceResponseByStepTypeEmail`

      Email steps.

      - `Bounced int64`

        Sent emails that bounced.

      - `BounceRate float64`

        Bounced divided by sent; null if none sent.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

      - `Delivered int64`

        Sent minus bounced, never below zero.

      - `Opened int64`

        Sent emails that were opened.

      - `OpenRate float64`

        Opened divided by delivered; null if none delivered.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by delivered; null if none delivered.

      - `Sent int64`

        Messages sent.

    - `LinkedinInvite SequenceRetrievePerformanceResponseByStepTypeLinkedinInvite`

      LinkedIn connection request steps.

      - `AcceptanceRate float64`

        Accepted divided by sent; null if none sent.

      - `Accepted int64`

        Connection requests that were accepted.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

    - `LinkedinMessage SequenceRetrievePerformanceResponseByStepTypeLinkedinMessage`

      LinkedIn message steps.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

      - `Read int64`

        Sent messages that were read.

      - `ReadRate float64`

        Read divided by sent; null if none sent.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

    - `Wait SequenceRetrievePerformanceResponseByStepTypeWait`

      Wait steps.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

    - `WaitForConnection SequenceRetrievePerformanceResponseByStepTypeWaitForConnection`

      Wait-for-connection steps.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

  - `PerStep []SequenceRetrievePerformanceResponsePerStepUnion`

    Per-step statistics in published sequence order, including steps with no activity. Steps no longer in the published definition are included if they have sent messages.

    - `type SequenceRetrievePerformanceResponsePerStepEmailStep struct{…}`

      - `Bounced int64`

        Sent emails that bounced.

      - `BounceRate float64`

        Bounced divided by sent; null if none sent.

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Delivered int64`

        Sent minus bounced, never below zero.

      - `Opened int64`

        Sent emails that were opened.

      - `OpenRate float64`

        Opened divided by delivered; null if none delivered.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by delivered; null if none delivered.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepEmailStepSequenceStepTypeEmail SequenceRetrievePerformanceResponsePerStepEmailStepSequenceStepType = "EMAIL"`

    - `type SequenceRetrievePerformanceResponsePerStepLinkedInMessageStep struct{…}`

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Read int64`

        Sent messages that were read.

      - `ReadRate float64`

        Read divided by sent; null if none sent.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepLinkedInMessageStepSequenceStepTypeLinkedinMessage SequenceRetrievePerformanceResponsePerStepLinkedInMessageStepSequenceStepType = "LINKEDIN_MESSAGE"`

    - `type SequenceRetrievePerformanceResponsePerStepLinkedInInviteStep struct{…}`

      - `AcceptanceRate float64`

        Accepted divided by sent; null if none sent.

      - `Accepted int64`

        Connection requests that were accepted.

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepLinkedInInviteStepSequenceStepTypeLinkedinInvite SequenceRetrievePerformanceResponsePerStepLinkedInInviteStepSequenceStepType = "LINKEDIN_INVITE"`

    - `type SequenceRetrievePerformanceResponsePerStepWaitStep struct{…}`

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepWaitStepSequenceStepTypeWait SequenceRetrievePerformanceResponsePerStepWaitStepSequenceStepType = "WAIT"`

    - `type SequenceRetrievePerformanceResponsePerStepWaitForConnectionStep struct{…}`

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepWaitForConnectionStepSequenceStepTypeWaitForConnection SequenceRetrievePerformanceResponsePerStepWaitForConnectionStepSequenceStepType = "WAIT_FOR_CONNECTION"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceRetrievePerformanceResponse, err := client.Sequence.GetPerformance(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceRetrievePerformanceResponse.ByStepType)
}
```

#### Response

```json
{
  "byStepType": {
    "EMAIL": {
      "bounced": -9007199254740991,
      "bounceRate": 0,
      "currentEnrollments": -9007199254740991,
      "delivered": -9007199254740991,
      "opened": -9007199254740991,
      "openRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "LINKEDIN_INVITE": {
      "acceptanceRate": 0,
      "accepted": -9007199254740991,
      "currentEnrollments": -9007199254740991,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "LINKEDIN_MESSAGE": {
      "currentEnrollments": -9007199254740991,
      "read": -9007199254740991,
      "readRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "WAIT": {
      "currentEnrollments": -9007199254740991
    },
    "WAIT_FOR_CONNECTION": {
      "currentEnrollments": -9007199254740991
    }
  },
  "perStep": [
    {
      "bounced": -9007199254740991,
      "bounceRate": 0,
      "currentEnrollments": -9007199254740991,
      "delivered": -9007199254740991,
      "opened": -9007199254740991,
      "openRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991,
      "sequenceStepId": "sequenceStepId",
      "sequenceStepType": "EMAIL"
    }
  ]
}
```

## Retrieve a sequence enrollment

`client.Sequence.GetEnrollment(ctx, enrollmentID, query) (*SequenceRetrieveEnrollmentResponse, error)`

**get** `/v1/sequences/{id}/enrollments/{enrollmentId}`

Retrieves a single enrollment by its ID: the contact’s position in the cadence and its latest activity. Test-run enrollments are not returned.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `enrollmentID string`

  Unique identifier of the enrollment to retrieve.

- `query SequenceGetEnrollmentParams`

  - `ID param.Field[string]`

    Unique identifier of the sequence.

### Returns

- `type SequenceRetrieveEnrollmentResponse struct{…}`

  - `ID string`

    Unique identifier of the enrollment.

  - `CancelledAt string`

    When the enrollment was cancelled, or null if it was not.

  - `CompletedAt string`

    When the enrollment completed, or null if it has not.

  - `ContactID string`

    ID of the enrolled contact.

  - `CurrentStepID string`

    ID of the step the contact is on, matching `definition.steps`; null when the contact has no current step the API returns.

  - `EnrolledAt string`

    When the contact was enrolled.

  - `EnrolledBy string`

    Member ID of whoever enrolled the contact; null when they are no longer a member or the enrollment was automatic.

  - `LastActivityAt string`

    When `lastActivityKind` happened; null when there has been no activity.

  - `LastActivityKind SequenceRetrieveEnrollmentResponseLastActivityKind`

    The latest activity on the enrollment. A reply or bounce that ended the enrollment is reported over a later open.

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindSent SequenceRetrieveEnrollmentResponseLastActivityKind = "SENT"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindOpened SequenceRetrieveEnrollmentResponseLastActivityKind = "OPENED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindReplied SequenceRetrieveEnrollmentResponseLastActivityKind = "REPLIED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindBounced SequenceRetrieveEnrollmentResponseLastActivityKind = "BOUNCED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindInvited SequenceRetrieveEnrollmentResponseLastActivityKind = "INVITED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindConnected SequenceRetrieveEnrollmentResponseLastActivityKind = "CONNECTED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindSeen SequenceRetrieveEnrollmentResponseLastActivityKind = "SEEN"`

  - `NextSendAt string`

    Estimated time of the next send, from the cadence, send window, pacing and sender; queue order and random gaps can push it later. Null while a message awaits review or is sending, while paused, or when it cannot be estimated.

  - `RemainingSends int64`

    Email and LinkedIn steps not yet sent, connection requests included.

  - `RepliedAt string`

    When the contact first replied, on email or LinkedIn; null if they have not.

  - `Status SequenceRetrieveEnrollmentResponseStatus`

    `ACTIVE` is progressing; `AWAITING_REVIEW` has a message waiting for approval; `NEEDS_ATTENTION` is held by a failed step, a held draft or an unavailable sender; `PAUSED` is stopped because the sequence is deactivated or it was paused in Lightfield. `REPLIED`, `COMPLETED`, `CANCELLED` and `FAILED` are final.

    - `const SequenceRetrieveEnrollmentResponseStatusActive SequenceRetrieveEnrollmentResponseStatus = "ACTIVE"`

    - `const SequenceRetrieveEnrollmentResponseStatusAwaitingReview SequenceRetrieveEnrollmentResponseStatus = "AWAITING_REVIEW"`

    - `const SequenceRetrieveEnrollmentResponseStatusNeedsAttention SequenceRetrieveEnrollmentResponseStatus = "NEEDS_ATTENTION"`

    - `const SequenceRetrieveEnrollmentResponseStatusReplied SequenceRetrieveEnrollmentResponseStatus = "REPLIED"`

    - `const SequenceRetrieveEnrollmentResponseStatusCompleted SequenceRetrieveEnrollmentResponseStatus = "COMPLETED"`

    - `const SequenceRetrieveEnrollmentResponseStatusPaused SequenceRetrieveEnrollmentResponseStatus = "PAUSED"`

    - `const SequenceRetrieveEnrollmentResponseStatusCancelled SequenceRetrieveEnrollmentResponseStatus = "CANCELLED"`

    - `const SequenceRetrieveEnrollmentResponseStatusFailed SequenceRetrieveEnrollmentResponseStatus = "FAILED"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceRetrieveEnrollmentResponse, err := client.Sequence.GetEnrollment(
    context.TODO(),
    "enrollmentId",
    githubcomlightfldlightfieldgo.SequenceGetEnrollmentParams{
      ID: "id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceRetrieveEnrollmentResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "cancelledAt": "cancelledAt",
  "completedAt": "completedAt",
  "contactId": "contactId",
  "currentStepId": "currentStepId",
  "enrolledAt": "enrolledAt",
  "enrolledBy": "enrolledBy",
  "lastActivityAt": "lastActivityAt",
  "lastActivityKind": "SENT",
  "nextSendAt": "nextSendAt",
  "remainingSends": -9007199254740991,
  "repliedAt": "repliedAt",
  "status": "ACTIVE"
}
```

## List sequence enrollments

`client.Sequence.ListEnrollments(ctx, id, query) (*SequenceListEnrollmentsResponse, error)`

**get** `/v1/sequences/{id}/enrollments`

Returns a paginated list of a sequence’s enrollments, including completed and cancelled ones. Results are sorted by when the contact was enrolled (`enrolledAt`), newest first. Test-run enrollments are not included. Use `offset` and `limit` to paginate through results, and bracketed filters to narrow the list. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.

Supported filters: `status[equal]` (ACTIVE, AWAITING_REVIEW, NEEDS_ATTENTION, REPLIED, COMPLETED, PAUSED, CANCELLED, FAILED), `contactId[equal]`, `currentStepId[equal]`, and `enrolledAt`, `lastActivityAt` or `repliedAt` with `[greaterThanOrEqual]` or `[lessThanOrEqual]` (ISO 8601 timestamps with a timezone). Filters are combined with AND.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

- `query SequenceListEnrollmentsParams`

  - `Limit param.Field[int64]`

    Maximum number of records to return. Defaults to 25, maximum 25.

  - `Offset param.Field[int64]`

    Number of records to skip for pagination. Defaults to 0.

### Returns

- `type SequenceListEnrollmentsResponse struct{…}`

  - `Data []SequenceListEnrollmentsResponseData`

    - `ID string`

      Unique identifier of the enrollment.

    - `CancelledAt string`

      When the enrollment was cancelled, or null if it was not.

    - `CompletedAt string`

      When the enrollment completed, or null if it has not.

    - `ContactID string`

      ID of the enrolled contact.

    - `CurrentStepID string`

      ID of the step the contact is on, matching `definition.steps`; null when the contact has no current step the API returns.

    - `EnrolledAt string`

      When the contact was enrolled.

    - `EnrolledBy string`

      Member ID of whoever enrolled the contact; null when they are no longer a member or the enrollment was automatic.

    - `LastActivityAt string`

      When `lastActivityKind` happened; null when there has been no activity.

    - `LastActivityKind string`

      The latest activity on the enrollment. A reply or bounce that ended the enrollment is reported over a later open.

      - `const SequenceListEnrollmentsResponseDataLastActivityKindSent SequenceListEnrollmentsResponseDataLastActivityKind = "SENT"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindOpened SequenceListEnrollmentsResponseDataLastActivityKind = "OPENED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindReplied SequenceListEnrollmentsResponseDataLastActivityKind = "REPLIED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindBounced SequenceListEnrollmentsResponseDataLastActivityKind = "BOUNCED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindInvited SequenceListEnrollmentsResponseDataLastActivityKind = "INVITED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindConnected SequenceListEnrollmentsResponseDataLastActivityKind = "CONNECTED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindSeen SequenceListEnrollmentsResponseDataLastActivityKind = "SEEN"`

    - `NextSendAt string`

      Estimated time of the next send, from the cadence, send window, pacing and sender; queue order and random gaps can push it later. Null while a message awaits review or is sending, while paused, or when it cannot be estimated.

    - `RemainingSends int64`

      Email and LinkedIn steps not yet sent, connection requests included.

    - `RepliedAt string`

      When the contact first replied, on email or LinkedIn; null if they have not.

    - `Status string`

      `ACTIVE` is progressing; `AWAITING_REVIEW` has a message waiting for approval; `NEEDS_ATTENTION` is held by a failed step, a held draft or an unavailable sender; `PAUSED` is stopped because the sequence is deactivated or it was paused in Lightfield. `REPLIED`, `COMPLETED`, `CANCELLED` and `FAILED` are final.

      - `const SequenceListEnrollmentsResponseDataStatusActive SequenceListEnrollmentsResponseDataStatus = "ACTIVE"`

      - `const SequenceListEnrollmentsResponseDataStatusAwaitingReview SequenceListEnrollmentsResponseDataStatus = "AWAITING_REVIEW"`

      - `const SequenceListEnrollmentsResponseDataStatusNeedsAttention SequenceListEnrollmentsResponseDataStatus = "NEEDS_ATTENTION"`

      - `const SequenceListEnrollmentsResponseDataStatusReplied SequenceListEnrollmentsResponseDataStatus = "REPLIED"`

      - `const SequenceListEnrollmentsResponseDataStatusCompleted SequenceListEnrollmentsResponseDataStatus = "COMPLETED"`

      - `const SequenceListEnrollmentsResponseDataStatusPaused SequenceListEnrollmentsResponseDataStatus = "PAUSED"`

      - `const SequenceListEnrollmentsResponseDataStatusCancelled SequenceListEnrollmentsResponseDataStatus = "CANCELLED"`

      - `const SequenceListEnrollmentsResponseDataStatusFailed SequenceListEnrollmentsResponseDataStatus = "FAILED"`

  - `Object SequenceListEnrollmentsResponseObject`

    - `const SequenceListEnrollmentsResponseObjectList SequenceListEnrollmentsResponseObject = "list"`

  - `TotalCount int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceListEnrollmentsResponse, err := client.Sequence.ListEnrollments(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequenceListEnrollmentsParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceListEnrollmentsResponse.Data)
}
```

#### Response

```json
{
  "data": [
    {
      "id": "id",
      "cancelledAt": "cancelledAt",
      "completedAt": "completedAt",
      "contactId": "contactId",
      "currentStepId": "currentStepId",
      "enrolledAt": "enrolledAt",
      "enrolledBy": "enrolledBy",
      "lastActivityAt": "lastActivityAt",
      "lastActivityKind": "SENT",
      "nextSendAt": "nextSendAt",
      "remainingSends": -9007199254740991,
      "repliedAt": "repliedAt",
      "status": "ACTIVE"
    }
  ],
  "object": "list",
  "totalCount": -9007199254740991
}
```

## List sequence messages

`client.Sequence.ListMessages(ctx, id, query) (*SequenceListMessagesResponse, error)`

**get** `/v1/sequences/{id}/messages`

Returns a paginated list of a sequence’s messages: every outbound email and LinkedIn message, and each enrollment’s first reply. Results are sorted by `createdAt`, newest first. Superseded outbound attempts are not included, and list items omit content; retrieve a message to read it. Use `offset` and `limit` to paginate through results, and bracketed filters to narrow the list. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.

Supported filters: `contactId`, `enrollmentId`, `sequenceStepId`, `sequenceStepType` (EMAIL, LINKEDIN_MESSAGE, LINKEDIN_INVITE), `channel` (EMAIL, LINKEDIN), `direction` (OUTBOUND, INBOUND) and `status` (AWAITING_REVIEW, SCHEDULED, QUEUED, SENT, SKIPPED, FAILED, CANCELLED), with `[equal]` or no operator; and `sentAt`, `openedAt`, `readAt`, `repliedAt`, `bouncedAt`, `acceptedAt` or `receivedAt` with `[greaterThan]`, `[greaterThanOrEqual]`, `[lessThan]` or `[lessThanOrEqual]` (ISO 8601 timestamps with a timezone). Filters are combined with AND; a `status` filter excludes incoming replies.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

- `query SequenceListMessagesParams`

  - `Limit param.Field[int64]`

    Maximum number of records to return. Defaults to 25, maximum 25.

  - `Offset param.Field[int64]`

    Number of records to skip for pagination. Defaults to 0.

### Returns

- `type SequenceListMessagesResponse struct{…}`

  - `Data []SequenceListMessagesResponseDataUnion`

    - `type SequenceListMessagesResponseDataOutboundMessage struct{…}`

      - `ID string`

        Unique identifier of the message.

      - `AcceptedAt string`

        When the connection request was accepted; null until then.

      - `BouncedAt string`

        When the email bounced; null until then.

      - `Channel string`

        Channel the message went over.

        - `const SequenceListMessagesResponseDataOutboundMessageChannelEmail SequenceListMessagesResponseDataOutboundMessageChannel = "EMAIL"`

        - `const SequenceListMessagesResponseDataOutboundMessageChannelLinkedin SequenceListMessagesResponseDataOutboundMessageChannel = "LINKEDIN"`

      - `ContactID string`

        ID of the contact.

      - `CreatedAt string`

        When the message was created, or when a reply was received. Lists sort by this field, newest first.

      - `Direction string`

        Always `OUTBOUND`.

        - `const SequenceListMessagesResponseDataOutboundMessageDirectionOutbound SequenceListMessagesResponseDataOutboundMessageDirection = "OUTBOUND"`

      - `EnrollmentID string`

        ID of the enrollment the message belongs to.

      - `OpenedAt string`

        When the email was opened; null until then.

      - `ReadAt string`

        When the LinkedIn message was read; null until then.

      - `Reference SequenceListMessagesResponseDataOutboundMessageReferenceUnion`

        The email or LinkedIn message record behind this sequence message, readable with <u>[Retrieve an email](/api/resources/email/methods/retrieve)</u> or <u>[Retrieve a message](/api/resources/message/methods/retrieve)</u> under their own scopes; null when there is none.

        - `type SequenceListMessagesResponseDataOutboundMessageReferenceEmail struct{…}`

          - `ID string`

            ID of the email.

          - `ObjectType string`

            Always `email`.

            - `const SequenceListMessagesResponseDataOutboundMessageReferenceEmailObjectTypeEmail SequenceListMessagesResponseDataOutboundMessageReferenceEmailObjectType = "email"`

        - `type SequenceListMessagesResponseDataOutboundMessageReferenceMessage struct{…}`

          - `ID string`

            ID of the message.

          - `ObjectType string`

            Always `message`.

            - `const SequenceListMessagesResponseDataOutboundMessageReferenceMessageObjectTypeMessage SequenceListMessagesResponseDataOutboundMessageReferenceMessageObjectType = "message"`

      - `RepliedAt string`

        When the contact replied to this message; null until then.

      - `SentAt string`

        When the message was sent; null until then.

      - `SequenceStepID string`

        ID of the step that sent the message or, for a reply, the step it replied to.

      - `SequenceStepType string`

        Type of that step.

        - `const SequenceListMessagesResponseDataOutboundMessageSequenceStepTypeEmail SequenceListMessagesResponseDataOutboundMessageSequenceStepType = "EMAIL"`

        - `const SequenceListMessagesResponseDataOutboundMessageSequenceStepTypeLinkedinMessage SequenceListMessagesResponseDataOutboundMessageSequenceStepType = "LINKEDIN_MESSAGE"`

        - `const SequenceListMessagesResponseDataOutboundMessageSequenceStepTypeLinkedinInvite SequenceListMessagesResponseDataOutboundMessageSequenceStepType = "LINKEDIN_INVITE"`

      - `Status string`

        `AWAITING_REVIEW` is waiting for approval; `SCHEDULED` is composed and waiting for its send time; `QUEUED` is due and waiting on the sender. `SENT`, `SKIPPED`, `FAILED` and `CANCELLED` are final.

        - `const SequenceListMessagesResponseDataOutboundMessageStatusAwaitingReview SequenceListMessagesResponseDataOutboundMessageStatus = "AWAITING_REVIEW"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusScheduled SequenceListMessagesResponseDataOutboundMessageStatus = "SCHEDULED"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusQueued SequenceListMessagesResponseDataOutboundMessageStatus = "QUEUED"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusSent SequenceListMessagesResponseDataOutboundMessageStatus = "SENT"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusSkipped SequenceListMessagesResponseDataOutboundMessageStatus = "SKIPPED"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusFailed SequenceListMessagesResponseDataOutboundMessageStatus = "FAILED"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusCancelled SequenceListMessagesResponseDataOutboundMessageStatus = "CANCELLED"`

      - `StatusChangedAt string`

        When `status` last changed.

    - `type SequenceListMessagesResponseDataReply struct{…}`

      - `ID string`

        Unique identifier of the message.

      - `Channel string`

        Channel the message went over.

        - `const SequenceListMessagesResponseDataReplyChannelEmail SequenceListMessagesResponseDataReplyChannel = "EMAIL"`

        - `const SequenceListMessagesResponseDataReplyChannelLinkedin SequenceListMessagesResponseDataReplyChannel = "LINKEDIN"`

      - `ContactID string`

        ID of the contact.

      - `CreatedAt string`

        When the message was created, or when a reply was received. Lists sort by this field, newest first.

      - `Direction string`

        Always `INBOUND`.

        - `const SequenceListMessagesResponseDataReplyDirectionInbound SequenceListMessagesResponseDataReplyDirection = "INBOUND"`

      - `EnrollmentID string`

        ID of the enrollment the message belongs to.

      - `ReceivedAt string`

        When the reply was received.

      - `Reference SequenceListMessagesResponseDataReplyReferenceUnion`

        The email or LinkedIn message record behind this sequence message, readable with <u>[Retrieve an email](/api/resources/email/methods/retrieve)</u> or <u>[Retrieve a message](/api/resources/message/methods/retrieve)</u> under their own scopes; null when there is none.

        - `type SequenceListMessagesResponseDataReplyReferenceEmail struct{…}`

          - `ID string`

            ID of the email.

          - `ObjectType string`

            Always `email`.

            - `const SequenceListMessagesResponseDataReplyReferenceEmailObjectTypeEmail SequenceListMessagesResponseDataReplyReferenceEmailObjectType = "email"`

        - `type SequenceListMessagesResponseDataReplyReferenceMessage struct{…}`

          - `ID string`

            ID of the message.

          - `ObjectType string`

            Always `message`.

            - `const SequenceListMessagesResponseDataReplyReferenceMessageObjectTypeMessage SequenceListMessagesResponseDataReplyReferenceMessageObjectType = "message"`

      - `SequenceStepID string`

        ID of the step that sent the message or, for a reply, the step it replied to.

      - `SequenceStepType string`

        Type of that step.

        - `const SequenceListMessagesResponseDataReplySequenceStepTypeEmail SequenceListMessagesResponseDataReplySequenceStepType = "EMAIL"`

        - `const SequenceListMessagesResponseDataReplySequenceStepTypeLinkedinMessage SequenceListMessagesResponseDataReplySequenceStepType = "LINKEDIN_MESSAGE"`

        - `const SequenceListMessagesResponseDataReplySequenceStepTypeLinkedinInvite SequenceListMessagesResponseDataReplySequenceStepType = "LINKEDIN_INVITE"`

  - `Object SequenceListMessagesResponseObject`

    - `const SequenceListMessagesResponseObjectList SequenceListMessagesResponseObject = "list"`

  - `TotalCount int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceListMessagesResponse, err := client.Sequence.ListMessages(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequenceListMessagesParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceListMessagesResponse.Data)
}
```

#### Response

```json
{
  "data": [
    {
      "id": "id",
      "acceptedAt": "acceptedAt",
      "bouncedAt": "bouncedAt",
      "channel": "EMAIL",
      "contactId": "contactId",
      "createdAt": "createdAt",
      "direction": "OUTBOUND",
      "enrollmentId": "enrollmentId",
      "openedAt": "openedAt",
      "readAt": "readAt",
      "reference": {
        "id": "id",
        "objectType": "email"
      },
      "repliedAt": "repliedAt",
      "sentAt": "sentAt",
      "sequenceStepId": "sequenceStepId",
      "sequenceStepType": "EMAIL",
      "status": "AWAITING_REVIEW",
      "statusChangedAt": "statusChangedAt"
    }
  ],
  "object": "list",
  "totalCount": -9007199254740991
}
```

## Retrieve a sequence message

`client.Sequence.GetMessage(ctx, messageID, query) (*SequenceRetrieveMessageResponseUnion, error)`

**get** `/v1/sequences/{id}/messages/{messageId}`

Retrieves a single sequence message by its ID: an outbound email or LinkedIn message, or an enrollment’s first reply, with its plain-text content. Content is returned with `sequences:read` regardless of the email’s privacy; see <u>[Sequence message access](/using-the-api/scopes/#sequence-message-access)</u>.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `messageID string`

  Unique identifier of the message to retrieve.

- `query SequenceGetMessageParams`

  - `ID param.Field[string]`

    Unique identifier of the sequence.

### Returns

- `type SequenceRetrieveMessageResponseUnion interface{…}`

  - `type SequenceRetrieveMessageResponseOutboundMessage struct{…}`

    - `ID string`

      Unique identifier of the message.

    - `AcceptedAt string`

      When the connection request was accepted; null until then.

    - `BouncedAt string`

      When the email bounced; null until then.

    - `Channel string`

      Channel the message went over.

      - `const SequenceRetrieveMessageResponseOutboundMessageChannelEmail SequenceRetrieveMessageResponseOutboundMessageChannel = "EMAIL"`

      - `const SequenceRetrieveMessageResponseOutboundMessageChannelLinkedin SequenceRetrieveMessageResponseOutboundMessageChannel = "LINKEDIN"`

    - `ContactID string`

      ID of the contact.

    - `Content SequenceRetrieveMessageResponseOutboundMessageContent`

      Plain-text content of the message. Null when the underlying record is no longer available; not included in list responses.

      - `Body string`

        Plain-text body; null for a connection request sent without a note.

      - `Subject string`

        Email subject; null for LinkedIn.

    - `CreatedAt string`

      When the message was created, or when a reply was received. Lists sort by this field, newest first.

    - `Direction string`

      Always `OUTBOUND`.

      - `const SequenceRetrieveMessageResponseOutboundMessageDirectionOutbound SequenceRetrieveMessageResponseOutboundMessageDirection = "OUTBOUND"`

    - `EnrollmentID string`

      ID of the enrollment the message belongs to.

    - `OpenedAt string`

      When the email was opened; null until then.

    - `ReadAt string`

      When the LinkedIn message was read; null until then.

    - `Reference SequenceRetrieveMessageResponseOutboundMessageReferenceUnion`

      The email or LinkedIn message record behind this sequence message, readable with <u>[Retrieve an email](/api/resources/email/methods/retrieve)</u> or <u>[Retrieve a message](/api/resources/message/methods/retrieve)</u> under their own scopes; null when there is none.

      - `type SequenceRetrieveMessageResponseOutboundMessageReferenceEmail struct{…}`

        - `ID string`

          ID of the email.

        - `ObjectType string`

          Always `email`.

          - `const SequenceRetrieveMessageResponseOutboundMessageReferenceEmailObjectTypeEmail SequenceRetrieveMessageResponseOutboundMessageReferenceEmailObjectType = "email"`

      - `type SequenceRetrieveMessageResponseOutboundMessageReferenceMessage struct{…}`

        - `ID string`

          ID of the message.

        - `ObjectType string`

          Always `message`.

          - `const SequenceRetrieveMessageResponseOutboundMessageReferenceMessageObjectTypeMessage SequenceRetrieveMessageResponseOutboundMessageReferenceMessageObjectType = "message"`

    - `RepliedAt string`

      When the contact replied to this message; null until then.

    - `SentAt string`

      When the message was sent; null until then.

    - `SequenceStepID string`

      ID of the step that sent the message or, for a reply, the step it replied to.

    - `SequenceStepType string`

      Type of that step.

      - `const SequenceRetrieveMessageResponseOutboundMessageSequenceStepTypeEmail SequenceRetrieveMessageResponseOutboundMessageSequenceStepType = "EMAIL"`

      - `const SequenceRetrieveMessageResponseOutboundMessageSequenceStepTypeLinkedinMessage SequenceRetrieveMessageResponseOutboundMessageSequenceStepType = "LINKEDIN_MESSAGE"`

      - `const SequenceRetrieveMessageResponseOutboundMessageSequenceStepTypeLinkedinInvite SequenceRetrieveMessageResponseOutboundMessageSequenceStepType = "LINKEDIN_INVITE"`

    - `Status string`

      `AWAITING_REVIEW` is waiting for approval; `SCHEDULED` is composed and waiting for its send time; `QUEUED` is due and waiting on the sender. `SENT`, `SKIPPED`, `FAILED` and `CANCELLED` are final.

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusAwaitingReview SequenceRetrieveMessageResponseOutboundMessageStatus = "AWAITING_REVIEW"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusScheduled SequenceRetrieveMessageResponseOutboundMessageStatus = "SCHEDULED"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusQueued SequenceRetrieveMessageResponseOutboundMessageStatus = "QUEUED"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusSent SequenceRetrieveMessageResponseOutboundMessageStatus = "SENT"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusSkipped SequenceRetrieveMessageResponseOutboundMessageStatus = "SKIPPED"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusFailed SequenceRetrieveMessageResponseOutboundMessageStatus = "FAILED"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusCancelled SequenceRetrieveMessageResponseOutboundMessageStatus = "CANCELLED"`

    - `StatusChangedAt string`

      When `status` last changed.

  - `type SequenceRetrieveMessageResponseReply struct{…}`

    - `ID string`

      Unique identifier of the message.

    - `Channel string`

      Channel the message went over.

      - `const SequenceRetrieveMessageResponseReplyChannelEmail SequenceRetrieveMessageResponseReplyChannel = "EMAIL"`

      - `const SequenceRetrieveMessageResponseReplyChannelLinkedin SequenceRetrieveMessageResponseReplyChannel = "LINKEDIN"`

    - `ContactID string`

      ID of the contact.

    - `Content SequenceRetrieveMessageResponseReplyContent`

      Plain-text content of the message. Null when the underlying record is no longer available; not included in list responses.

      - `Body string`

        Plain-text body; null for a connection request sent without a note.

      - `Subject string`

        Email subject; null for LinkedIn.

    - `CreatedAt string`

      When the message was created, or when a reply was received. Lists sort by this field, newest first.

    - `Direction string`

      Always `INBOUND`.

      - `const SequenceRetrieveMessageResponseReplyDirectionInbound SequenceRetrieveMessageResponseReplyDirection = "INBOUND"`

    - `EnrollmentID string`

      ID of the enrollment the message belongs to.

    - `ReceivedAt string`

      When the reply was received.

    - `Reference SequenceRetrieveMessageResponseReplyReferenceUnion`

      The email or LinkedIn message record behind this sequence message, readable with <u>[Retrieve an email](/api/resources/email/methods/retrieve)</u> or <u>[Retrieve a message](/api/resources/message/methods/retrieve)</u> under their own scopes; null when there is none.

      - `type SequenceRetrieveMessageResponseReplyReferenceEmail struct{…}`

        - `ID string`

          ID of the email.

        - `ObjectType string`

          Always `email`.

          - `const SequenceRetrieveMessageResponseReplyReferenceEmailObjectTypeEmail SequenceRetrieveMessageResponseReplyReferenceEmailObjectType = "email"`

      - `type SequenceRetrieveMessageResponseReplyReferenceMessage struct{…}`

        - `ID string`

          ID of the message.

        - `ObjectType string`

          Always `message`.

          - `const SequenceRetrieveMessageResponseReplyReferenceMessageObjectTypeMessage SequenceRetrieveMessageResponseReplyReferenceMessageObjectType = "message"`

    - `SequenceStepID string`

      ID of the step that sent the message or, for a reply, the step it replied to.

    - `SequenceStepType string`

      Type of that step.

      - `const SequenceRetrieveMessageResponseReplySequenceStepTypeEmail SequenceRetrieveMessageResponseReplySequenceStepType = "EMAIL"`

      - `const SequenceRetrieveMessageResponseReplySequenceStepTypeLinkedinMessage SequenceRetrieveMessageResponseReplySequenceStepType = "LINKEDIN_MESSAGE"`

      - `const SequenceRetrieveMessageResponseReplySequenceStepTypeLinkedinInvite SequenceRetrieveMessageResponseReplySequenceStepType = "LINKEDIN_INVITE"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceRetrieveMessageResponse, err := client.Sequence.GetMessage(
    context.TODO(),
    "messageId",
    githubcomlightfldlightfieldgo.SequenceGetMessageParams{
      ID: "id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceRetrieveMessageResponse)
}
```

#### Response

```json
{
  "id": "id",
  "acceptedAt": "acceptedAt",
  "bouncedAt": "bouncedAt",
  "channel": "EMAIL",
  "contactId": "contactId",
  "content": {
    "body": "body",
    "subject": "subject"
  },
  "createdAt": "createdAt",
  "direction": "OUTBOUND",
  "enrollmentId": "enrollmentId",
  "openedAt": "openedAt",
  "readAt": "readAt",
  "reference": {
    "id": "id",
    "objectType": "email"
  },
  "repliedAt": "repliedAt",
  "sentAt": "sentAt",
  "sequenceStepId": "sequenceStepId",
  "sequenceStepType": "EMAIL",
  "status": "AWAITING_REVIEW",
  "statusChangedAt": "statusChangedAt"
}
```

## Enroll and cancel contacts

`client.Sequence.UpdateEnrollments(ctx, id, body) (*SequenceUpdateEnrollmentsResponse, error)`

**post** `/v1/sequences/{id}/enrollments`

Enrolls the contacts in `add` and cancels the open enrollments of the contacts in `remove`, in one request: if any addition is invalid, nothing changes. Send add, remove or both, with at most 25 contact IDs in total; duplicate IDs are ignored, and an ID cannot be in both lists. The response has one result per contact: `enrolled`, `already_enrolled`, `unenrolled`, or `no_active_enrollment` for a removal with nothing open.

A contact already enrolled, paused included, is left as is; one whose earlier enrollment ended is enrolled again. Cancelling stops the contact’s remaining steps and leaves the enrollment readable with status `CANCELLED`. A paused sequence accepts enrollments and sends to them once it is activated; sending starts asynchronously.

Returns 400 `sequence_not_published` for a sequence that has never been published, and 400 `invalid_configuration` with `invalidContacts` naming each contact that cannot be enrolled and why. See <u>[Sequence errors](/using-the-api/errors/#sequence-errors)</u>.

**[Required scope](/using-the-api/scopes/):** `sequences:update`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

- `body SequenceUpdateEnrollmentsParams`

  - `Add param.Field[[]string]`

    Contact IDs to enroll. Open enrollments are unchanged; contacts whose prior enrollment ended are enrolled again.

  - `Remove param.Field[[]string]`

    Contact IDs to unenroll. Cancels open enrollments and preserves their history.

### Returns

- `type SequenceUpdateEnrollmentsResponse struct{…}`

  - `Results []SequenceUpdateEnrollmentsResponseResultUnion`

    One result per distinct contact, additions first, then removals.

    - `type SequenceUpdateEnrollmentsResponseResultEnrollmentChanged struct{…}`

      - `ContactID string`

        ID of the contact.

      - `EnrollmentID string`

        ID of the enrollment the outcome applies to.

      - `Outcome string`

        `enrolled` created the enrollment, `already_enrolled` left an open one as is, `unenrolled` cancelled it.

        - `const SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcomeEnrolled SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcome = "enrolled"`

        - `const SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcomeAlreadyEnrolled SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcome = "already_enrolled"`

        - `const SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcomeUnenrolled SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcome = "unenrolled"`

    - `type SequenceUpdateEnrollmentsResponseResultNothingToCancel struct{…}`

      - `ContactID string`

        ID of the contact.

      - `EnrollmentID any`

        Always null.

      - `Outcome string`

        The contact had no open enrollment to cancel.

        - `const SequenceUpdateEnrollmentsResponseResultNothingToCancelOutcomeNoActiveEnrollment SequenceUpdateEnrollmentsResponseResultNothingToCancelOutcome = "no_active_enrollment"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceUpdateEnrollmentsResponse, err := client.Sequence.UpdateEnrollments(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequenceUpdateEnrollmentsParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceUpdateEnrollmentsResponse.Results)
}
```

#### Response

```json
{
  "results": [
    {
      "contactId": "contactId",
      "enrollmentId": "enrollmentId",
      "outcome": "enrolled"
    }
  ]
}
```

## Start a sequence test

`client.Sequence.StartTest(ctx, id, body) (*SequenceStartTestResponse, error)`

**post** `/v1/sequences/{id}/tests`

Tries the sequence on one contact without sending anything: the contact is enrolled in a test, its steps run back to back with waits skipped, and each message is composed from the contact’s real data and kept as a draft. Use it to check what a step, a template variable or its fallback produces before publishing.

Tests the open draft when there is one or the sequence has never been published, otherwise the published version; `target` in the response says which. Send `expectedVersion` to test exactly the draft you last read. The test continues after the response, so the request returns right away with status `RUNNING`.

Returns 400 `invalid_configuration` with `invalidContacts` naming a contact that does not exist or lacks what a step needs (an email address, a LinkedIn URL or a phone number), or with `issues` when the draft cannot run, 400 `permissions_not_granted` when the draft has agent steps whose permissions are not granted (grant them in Lightfield), 400 `no_selectable_sender` when a channel has no available sender, 409 when `expectedVersion` is not the open draft’s `version`; retrieve the draft and retry, and 429 when a test limit is reached, with a message naming it: the workspace already has 10 tests running (retry once one is `COMPLETED` or `FAILED`), or it started more than 5 tests a minute (retry after `Retry-After` seconds). See <u>[Sequence errors](/using-the-api/errors/#sequence-errors)</u>.

Each call creates a test enrollment and drafts, and agent steps use model credits.

**[Required scope](/using-the-api/scopes/):** `sequences:update`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

- `body SequenceStartTestParams`

  - `ContactID param.Field[string]`

    ID of the contact to test the sequence on. The test composes each message from this contact’s real data and sends nothing.

  - `ExpectedVersion param.Field[string]`

    The open draft’s `version` as last read. When sent, the test runs exactly that draft, and is refused with 409 if the draft has changed or none is open. Omit it to test whatever is open now.

### Returns

- `type SequenceStartTestResponse struct{…}`

  - `ID string`

    ID of the test, an enrollment ID. Use it to read the result.

  - `ContactID string`

    ID of the contact being tested.

  - `Status SequenceStartTestResponseStatus`

    Always `RUNNING`: the test continues after the response.

    - `const SequenceStartTestResponseStatusRunning SequenceStartTestResponseStatus = "RUNNING"`

  - `Target SequenceStartTestResponseTarget`

    Which version is being tested: the open `DRAFT` when there is one or the sequence was never published, otherwise the `PUBLISHED` version.

    - `const SequenceStartTestResponseTargetDraft SequenceStartTestResponseTarget = "DRAFT"`

    - `const SequenceStartTestResponseTargetPublished SequenceStartTestResponseTarget = "PUBLISHED"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceStartTestResponse, err := client.Sequence.StartTest(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequenceStartTestParams{
      ContactID: "x",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceStartTestResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "contactId": "contactId",
  "status": "RUNNING",
  "target": "DRAFT"
}
```

## Retrieve a sequence test

`client.Sequence.GetTest(ctx, testID, query) (*SequenceRetrieveTestResponse, error)`

**get** `/v1/sequences/{id}/tests/{testId}`

Retrieves the result of a test started with [Start a sequence test](/api/resources/sequence/methods/startTest): its status, and for every step of the tested version whether it composed a message, was skipped or failed. Poll it until `status` is `COMPLETED` or `FAILED`.

An email step’s message is its subject and a markdown body, and a LinkedIn step’s message is its text. A step that failed carries the reason under `error`; a template step whose variable could not be filled for the contact fails this way, naming the fields. Steps that have not run are `PENDING`, including a step a finished test never reached; a step that produced nothing is `SKIPPED`. A test never waits, so a wait is always `SKIPPED`; a send step is `SKIPPED` when it has nothing to send, such as a LinkedIn invite another step already sent. A test never sends anything.

Returns 404 for a test that does not exist, belongs to another sequence, or is a live enrollment: use [Retrieve a sequence enrollment](/api/resources/sequence/methods/retrieveEnrollment) for those.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `testID string`

  The `id` returned when the test was started.

- `query SequenceGetTestParams`

  - `ID param.Field[string]`

    Unique identifier of the sequence.

### Returns

- `type SequenceRetrieveTestResponse struct{…}`

  - `ID string`

    ID of the test, an enrollment ID.

  - `ContactID string`

    ID of the contact tested.

  - `Status SequenceRetrieveTestResponseStatus`

    `RUNNING` until every step has finished, then `COMPLETED`, or `FAILED` when the test ended on a failure.

    - `const SequenceRetrieveTestResponseStatusRunning SequenceRetrieveTestResponseStatus = "RUNNING"`

    - `const SequenceRetrieveTestResponseStatusCompleted SequenceRetrieveTestResponseStatus = "COMPLETED"`

    - `const SequenceRetrieveTestResponseStatusFailed SequenceRetrieveTestResponseStatus = "FAILED"`

  - `Steps []SequenceRetrieveTestResponseStep`

    Every step of the tested version that the Sequences API lists, in run order. Call steps are not part of the API yet, so a test reports nothing for them.

    - `Error SequenceRetrieveTestResponseStepError`

      Why the step failed; null unless `outcome` is `FAILED`.

      - `Code string`

        `CONFIGURATION_ERROR` when the sequence or the contact needs a change, `SYSTEM_ERROR` when Lightfield failed.

        - `const SequenceRetrieveTestResponseStepErrorCodeConfigurationError SequenceRetrieveTestResponseStepErrorCode = "CONFIGURATION_ERROR"`

        - `const SequenceRetrieveTestResponseStepErrorCodeSystemError SequenceRetrieveTestResponseStepErrorCode = "SYSTEM_ERROR"`

      - `Message string`

        What went wrong, in plain words.

    - `Message SequenceRetrieveTestResponseStepMessageUnion`

      The composed message; null when the step has not composed one.

      - `type SequenceRetrieveTestResponseStepMessageEmailMessage struct{…}`

        - `Body string`

          Body as markdown, the same form a template step reads back in.

        - `Subject string`

          Subject line, as composed.

      - `type SequenceRetrieveTestResponseStepMessageLinkedInMessage struct{…}`

        - `Body string`

          Message text, as composed.

    - `Mode string`

      How a send step’s content is composed; null for a wait step.

      - `const SequenceRetrieveTestResponseStepModeAgent SequenceRetrieveTestResponseStepMode = "AGENT"`

      - `const SequenceRetrieveTestResponseStepModeTemplate SequenceRetrieveTestResponseStepMode = "TEMPLATE"`

    - `Name string`

      Name of the step, as in `definition.steps`; null for a wait step.

    - `Outcome string`

      `PENDING` while the step has not run, including a step a finished test never reached, `COMPOSED` when it produced a message, `SKIPPED` when it produced nothing: a test never waits, so a wait is always `SKIPPED`, and a send step is `SKIPPED` when it has nothing to send, such as a LinkedIn invite another step already sent. `FAILED` when it failed: see `error`.

      - `const SequenceRetrieveTestResponseStepOutcomePending SequenceRetrieveTestResponseStepOutcome = "PENDING"`

      - `const SequenceRetrieveTestResponseStepOutcomeComposed SequenceRetrieveTestResponseStepOutcome = "COMPOSED"`

      - `const SequenceRetrieveTestResponseStepOutcomeSkipped SequenceRetrieveTestResponseStepOutcome = "SKIPPED"`

      - `const SequenceRetrieveTestResponseStepOutcomeFailed SequenceRetrieveTestResponseStepOutcome = "FAILED"`

    - `StepID string`

      ID of the step, as in the sequence’s `definition.steps`.

    - `Type string`

      Step type.

      - `const SequenceRetrieveTestResponseStepTypeEmail SequenceRetrieveTestResponseStepType = "EMAIL"`

      - `const SequenceRetrieveTestResponseStepTypeLinkedinMessage SequenceRetrieveTestResponseStepType = "LINKEDIN_MESSAGE"`

      - `const SequenceRetrieveTestResponseStepTypeLinkedinInvite SequenceRetrieveTestResponseStepType = "LINKEDIN_INVITE"`

      - `const SequenceRetrieveTestResponseStepTypeWait SequenceRetrieveTestResponseStepType = "WAIT"`

      - `const SequenceRetrieveTestResponseStepTypeWaitForConnection SequenceRetrieveTestResponseStepType = "WAIT_FOR_CONNECTION"`

  - `Target SequenceRetrieveTestResponseTarget`

    Which version was tested.

    - `const SequenceRetrieveTestResponseTargetDraft SequenceRetrieveTestResponseTarget = "DRAFT"`

    - `const SequenceRetrieveTestResponseTargetPublished SequenceRetrieveTestResponseTarget = "PUBLISHED"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceRetrieveTestResponse, err := client.Sequence.GetTest(
    context.TODO(),
    "testId",
    githubcomlightfldlightfieldgo.SequenceGetTestParams{
      ID: "id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceRetrieveTestResponse.ID)
}
```

#### Response

```json
{
  "id": "id",
  "contactId": "contactId",
  "status": "RUNNING",
  "steps": [
    {
      "error": {
        "code": "CONFIGURATION_ERROR",
        "message": "message"
      },
      "message": {
        "body": "body",
        "subject": "subject"
      },
      "mode": "AGENT",
      "name": "name",
      "outcome": "PENDING",
      "stepId": "stepId",
      "type": "EMAIL"
    }
  ],
  "target": "DRAFT"
}
```

## Create a sequence

`client.Sequence.New(ctx, body) (*SequenceCreateResponse, error)`

**post** `/v1/sequences`

Creates a new sequence and its first draft, and returns the draft. The sequence sends nothing until the draft is published and the sequence is activated.

Supports idempotency via the `Idempotency-Key` header.

Returns 400 `invalid_configuration` listing the draft’s problems under `issues`, and 400 `referenced_resource_missing` for a reviewer or sender that does not exist. See <u>[Sequence errors](/using-the-api/errors/#sequence-errors)</u>.

**[Required scope](/using-the-api/scopes/):** `sequences:create`

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

### Parameters

- `body SequenceNewParams`

  - `Definition param.Field[SequenceNewParamsDefinition]`

    Configuration of the first draft. `description` and `steps` are required.

    - `Description string`

      What this version of the sequence is for.

    - `Steps []SequenceNewParamsDefinitionStepUnion`

      The ordered step list.

      - `type SequenceNewParamsDefinitionStepObject struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceNewParamsDefinitionStepObjectDeliveryModeAuto SequenceNewParamsDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObjectDeliveryModeForReview SequenceNewParamsDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObjectTypeEmail SequenceNewParamsDefinitionStepObjectType = "EMAIL"`

          - `const SequenceNewParamsDefinitionStepObjectTypeLinkedinMessage SequenceNewParamsDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObjectModeAgent SequenceNewParamsDefinitionStepObjectMode = "AGENT"`

      - `type SequenceNewParamsDefinitionStepObject2 struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceNewParamsDefinitionStepObject2DeliveryModeAuto SequenceNewParamsDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObject2DeliveryModeForReview SequenceNewParamsDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObject2TypeLinkedinInvite SequenceNewParamsDefinitionStepObject2Type = "LINKEDIN_INVITE"`

        - `IncludeNote bool`

          Whether the connection request carries a note. Defaults to false.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObject2ModeAgent SequenceNewParamsDefinitionStepObject2Mode = "AGENT"`

      - `type SequenceNewParamsDefinitionStepObject3 struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceNewParamsDefinitionStepObject3DeliveryModeAuto SequenceNewParamsDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObject3DeliveryModeForReview SequenceNewParamsDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceNewParamsDefinitionStepObject3Template`

          The email every contact receives. Requires template steps for the workspace.

          - `Body string`

            Email body as Markdown; paragraphs, bold, italics, links and lists keep their formatting. Leave out the sign-off and signature, which are added when the message is written. A variable cannot be part of a link address. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

          - `Subject string`

            Plain-text subject line. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObject3TypeEmail SequenceNewParamsDefinitionStepObject3Type = "EMAIL"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObject3ModeTemplate SequenceNewParamsDefinitionStepObject3Mode = "TEMPLATE"`

      - `type SequenceNewParamsDefinitionStepObject4 struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceNewParamsDefinitionStepObject4DeliveryModeAuto SequenceNewParamsDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObject4DeliveryModeForReview SequenceNewParamsDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceNewParamsDefinitionStepObject4Template`

          The message every contact receives; for an invite, its connection note, sent only with `includeNote` and otherwise left empty. Requires template steps for the workspace.

          - `Body string`

            Plain-text message. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObject4TypeLinkedinMessage SequenceNewParamsDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObject4ModeTemplate SequenceNewParamsDefinitionStepObject4Mode = "TEMPLATE"`

      - `type SequenceNewParamsDefinitionStepObject5 struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceNewParamsDefinitionStepObject5DeliveryModeAuto SequenceNewParamsDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceNewParamsDefinitionStepObject5DeliveryModeForReview SequenceNewParamsDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceNewParamsDefinitionStepObject5Template`

          The message every contact receives; for an invite, its connection note, sent only with `includeNote` and otherwise left empty. Requires template steps for the workspace.

          - `Body string`

            Plain-text message. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceNewParamsDefinitionStepObject5TypeLinkedinInvite SequenceNewParamsDefinitionStepObject5Type = "LINKEDIN_INVITE"`

        - `IncludeNote bool`

          Whether the connection request carries a note. Defaults to false.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceNewParamsDefinitionStepObject5ModeTemplate SequenceNewParamsDefinitionStepObject5Mode = "TEMPLATE"`

      - `type SequenceNewParamsDefinitionStepObject6 struct{…}`

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceNewParamsDefinitionStepObject6TypeWait SequenceNewParamsDefinitionStepObject6Type = "WAIT"`

          - `const SequenceNewParamsDefinitionStepObject6TypeWaitForConnection SequenceNewParamsDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceNewParamsDefinitionStepObject6UnitDay SequenceNewParamsDefinitionStepObject6Unit = "DAY"`

          - `const SequenceNewParamsDefinitionStepObject6UnitMinute SequenceNewParamsDefinitionStepObject6Unit = "MINUTE"`

    - `Messaging SequenceNewParamsDefinitionMessaging`

      Messaging inputs that frame every step. Omitted or null fields are left unset.

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

      How the whole sequence paces each step type it sends, keyed by sequence step type. Omitted step types have no daily cap.

      - `Email SequenceNewParamsDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceNewParamsDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceNewParamsDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences. Defaults to `NORMAL`.

      - `const SequenceNewParamsDefinitionPriorityHigh SequenceNewParamsDefinitionPriority = "HIGH"`

      - `const SequenceNewParamsDefinitionPriorityNormal SequenceNewParamsDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceNewParamsDefinitionSendWindow`

      When the sequence may send. Omitted fields take the default: 9:00–17:00, Monday to Friday, UTC.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

  - `Name param.Field[string]`

    Name of the sequence.

  - `Reviewers param.Field[[]string]`

    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. Member IDs of active members. Omit for none.

  - `Senders param.Field[[]string]`

    The senders this sequence sends from; new contacts rotate across them. Sender IDs of unarchived senders. Omit for none; activating needs a sender for each channel the steps use.

### Returns

- `type SequenceCreateResponse struct{…}`

  - `Channels []string`

    Channels the draft's steps send on.

    - `const SequenceCreateResponseChannelEmail SequenceCreateResponseChannel = "EMAIL"`

    - `const SequenceCreateResponseChannelLinkedin SequenceCreateResponseChannel = "LINKEDIN"`

  - `Definition SequenceCreateResponseDefinition`

    The draft configuration, in the same shape as a published definition.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceCreateResponseDefinitionMessaging`

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

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

      - `Email SequenceCreateResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceCreateResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceCreateResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceCreateResponseDefinitionPriorityHigh SequenceCreateResponseDefinitionPriority = "HIGH"`

      - `const SequenceCreateResponseDefinitionPriorityNormal SequenceCreateResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceCreateResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceCreateResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceCreateResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObjectDeliveryModeAuto SequenceCreateResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObjectDeliveryModeForReview SequenceCreateResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObjectModeAgent SequenceCreateResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObjectTypeEmail SequenceCreateResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceCreateResponseDefinitionStepObjectTypeLinkedinMessage SequenceCreateResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceCreateResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObject2DeliveryModeAuto SequenceCreateResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject2DeliveryModeForReview SequenceCreateResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObject2ModeAgent SequenceCreateResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject2TypeLinkedinInvite SequenceCreateResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceCreateResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObject3DeliveryModeAuto SequenceCreateResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject3DeliveryModeForReview SequenceCreateResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObject3ModeTemplate SequenceCreateResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject3TypeEmail SequenceCreateResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceCreateResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObject4DeliveryModeAuto SequenceCreateResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject4DeliveryModeForReview SequenceCreateResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObject4ModeTemplate SequenceCreateResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject4TypeLinkedinMessage SequenceCreateResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceCreateResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObject5DeliveryModeAuto SequenceCreateResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject5DeliveryModeForReview SequenceCreateResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObject5ModeTemplate SequenceCreateResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject5TypeLinkedinInvite SequenceCreateResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceCreateResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceCreateResponseDefinitionStepObject6TypeWait SequenceCreateResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceCreateResponseDefinitionStepObject6TypeWaitForConnection SequenceCreateResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceCreateResponseDefinitionStepObject6UnitDay SequenceCreateResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceCreateResponseDefinitionStepObject6UnitMinute SequenceCreateResponseDefinitionStepObject6Unit = "MINUTE"`

  - `Name string`

    Name the sequence takes when the draft is published.

  - `PublishWarnings []SequenceCreateResponsePublishWarning`

    What publishing this draft would change for contacts already in the sequence; empty when nothing is affected. Before the first publish, the only possible warning is a proposed sender that was archived and would be left off.

    - `Code string`

      What publishing would change.

      - `const SequenceCreateResponsePublishWarningCodeDelayShortened SequenceCreateResponsePublishWarningCode = "delay_shortened"`

      - `const SequenceCreateResponsePublishWarningCodeDelayLengthened SequenceCreateResponsePublishWarningCode = "delay_lengthened"`

      - `const SequenceCreateResponsePublishWarningCodeConnectionWaitShortened SequenceCreateResponsePublishWarningCode = "connection_wait_shortened"`

      - `const SequenceCreateResponsePublishWarningCodeConnectionWaitLengthened SequenceCreateResponsePublishWarningCode = "connection_wait_lengthened"`

      - `const SequenceCreateResponsePublishWarningCodeSendScheduleChanged SequenceCreateResponsePublishWarningCode = "send_schedule_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendConfigurationChanged SequenceCreateResponsePublishWarningCode = "send_configuration_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendPriorityChanged SequenceCreateResponsePublishWarningCode = "send_priority_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendersChanged SequenceCreateResponsePublishWarningCode = "senders_changed"`

      - `const SequenceCreateResponsePublishWarningCodeEmailSenderPoolEmptied SequenceCreateResponsePublishWarningCode = "email_sender_pool_emptied"`

      - `const SequenceCreateResponsePublishWarningCodeLinkedinAccountPoolEmptied SequenceCreateResponsePublishWarningCode = "linkedin_account_pool_emptied"`

      - `const SequenceCreateResponsePublishWarningCodeAssignedSenderRemoved SequenceCreateResponsePublishWarningCode = "assigned_sender_removed"`

      - `const SequenceCreateResponsePublishWarningCodeDeliveryBecameAutomatic SequenceCreateResponsePublishWarningCode = "delivery_became_automatic"`

      - `const SequenceCreateResponsePublishWarningCodeInviteNoteEnabled SequenceCreateResponsePublishWarningCode = "invite_note_enabled"`

      - `const SequenceCreateResponsePublishWarningCodeInviteNoteDisabled SequenceCreateResponsePublishWarningCode = "invite_note_disabled"`

      - `const SequenceCreateResponsePublishWarningCodeStepInserted SequenceCreateResponsePublishWarningCode = "step_inserted"`

      - `const SequenceCreateResponsePublishWarningCodeAutomaticSendStepInserted SequenceCreateResponsePublishWarningCode = "automatic_send_step_inserted"`

      - `const SequenceCreateResponsePublishWarningCodeStepRemoved SequenceCreateResponsePublishWarningCode = "step_removed"`

      - `const SequenceCreateResponsePublishWarningCodeStepTypeChanged SequenceCreateResponsePublishWarningCode = "step_type_changed"`

      - `const SequenceCreateResponsePublishWarningCodeStepOrderChanged SequenceCreateResponsePublishWarningCode = "step_order_changed"`

      - `const SequenceCreateResponsePublishWarningCodeFullIdentityRewrite SequenceCreateResponsePublishWarningCode = "full_identity_rewrite"`

      - `const SequenceCreateResponsePublishWarningCodeLowIdentityOverlap SequenceCreateResponsePublishWarningCode = "low_identity_overlap"`

    - `Message string`

      What would change, in plain language.

    - `Severity string`

      `destructive` when contacts already in the sequence may skip, repeat or receive a step they would not have; `warning` otherwise.

      - `const SequenceCreateResponsePublishWarningSeverityWarning SequenceCreateResponsePublishWarningSeverity = "warning"`

      - `const SequenceCreateResponsePublishWarningSeverityDestructive SequenceCreateResponsePublishWarningSeverity = "destructive"`

    - `StepIDs []string`

      The steps involved; empty for a sequence-wide change.

  - `Reviewers []SequenceCreateResponseReviewer`

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

      Always `member`.

      - `const SequenceCreateResponseReviewerObjectTypeMember SequenceCreateResponseReviewerObjectType = "member"`

  - `Senders []SequenceCreateResponseSender`

    The senders this draft will publish; new contacts rotate across them. Until a save changes it, this is the sequence’s live list. An archived sender stays listed but never sends; any change to the list drops it.

    - `ID string`

      ID of the sender.

    - `ObjectType string`

      Always `sender`.

      - `const SequenceCreateResponseSenderObjectTypeSender SequenceCreateResponseSenderObjectType = "sender"`

  - `SequenceID string`

    The sequence this draft belongs to.

  - `UpdatedAt string`

    When the draft last changed.

  - `Version string`

    Opaque token for the current state of the draft. Send it as `expectedVersion` on the next save, publish or discard; it changes whenever anyone edits the draft.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceCreateResponse, err := client.Sequence.New(context.TODO(), githubcomlightfldlightfieldgo.SequenceNewParams{
    Definition: githubcomlightfldlightfieldgo.SequenceNewParamsDefinition{
      Description: "x",
      Steps: []githubcomlightfldlightfieldgo.SequenceNewParamsDefinitionStepUnion{githubcomlightfldlightfieldgo.SequenceNewParamsDefinitionStepUnion{
        OfSequenceNewsDefinitionStepObject: &githubcomlightfldlightfieldgo.SequenceNewParamsDefinitionStepObject{
          DeliveryMode: "AUTO",
          Name: "x",
          Prompt: "x",
          Type: "EMAIL",
        },
      }},
    },
    Name: "x",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceCreateResponse.Channels)
}
```

#### Response

```json
{
  "channels": [
    "EMAIL"
  ],
  "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"
      }
    ]
  },
  "name": "name",
  "publishWarnings": [
    {
      "code": "delay_shortened",
      "message": "message",
      "severity": "warning",
      "stepIds": [
        "string"
      ]
    }
  ],
  "reviewers": [
    {
      "id": "x",
      "objectType": "member"
    }
  ],
  "senders": [
    {
      "id": "x",
      "objectType": "sender"
    }
  ],
  "sequenceId": "sequenceId",
  "updatedAt": "updatedAt",
  "version": "version"
}
```

## Activate a sequence

`client.Sequence.Activate(ctx, id, body) (*SequenceActivateResponse, error)`

**post** `/v1/sequences/{id}/activate`

Starts sending a published sequence to its enrolled contacts and returns it. Requires a published version and an available sender for each channel the steps use; senders are added through the draft. An active sequence is returned unchanged. The sequence’s status changes immediately; its enrollments’ statuses follow asynchronously. Returns 400 `sequence_not_published` before the first publish, 400 `no_selectable_sender` when a channel has no available sender, 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 string`

  Unique identifier of the sequence.

- `body SequenceActivateParams`

  - `Body param.Field[SequenceActivateParamsBody]`

### Returns

- `type SequenceActivateResponse struct{…}`

  - `ID string`

    Unique identifier of the sequence.

  - `Channels []string`

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

    - `const SequenceActivateResponseChannelEmail SequenceActivateResponseChannel = "EMAIL"`

    - `const SequenceActivateResponseChannelLinkedin SequenceActivateResponseChannel = "LINKEDIN"`

  - `CreatedAt string`

    ISO 8601 creation timestamp.

  - `Definition SequenceActivateResponseDefinition`

    Published configuration, or null before the first publish.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceActivateResponseDefinitionMessaging`

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

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

      - `Email SequenceActivateResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceActivateResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceActivateResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceActivateResponseDefinitionPriorityHigh SequenceActivateResponseDefinitionPriority = "HIGH"`

      - `const SequenceActivateResponseDefinitionPriorityNormal SequenceActivateResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceActivateResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceActivateResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceActivateResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObjectDeliveryModeAuto SequenceActivateResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObjectDeliveryModeForReview SequenceActivateResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObjectModeAgent SequenceActivateResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceActivateResponseDefinitionStepObjectTypeEmail SequenceActivateResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceActivateResponseDefinitionStepObjectTypeLinkedinMessage SequenceActivateResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceActivateResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObject2DeliveryModeAuto SequenceActivateResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObject2DeliveryModeForReview SequenceActivateResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObject2ModeAgent SequenceActivateResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceActivateResponseDefinitionStepObject2TypeLinkedinInvite SequenceActivateResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceActivateResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObject3DeliveryModeAuto SequenceActivateResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObject3DeliveryModeForReview SequenceActivateResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObject3ModeTemplate SequenceActivateResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceActivateResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceActivateResponseDefinitionStepObject3TypeEmail SequenceActivateResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceActivateResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObject4DeliveryModeAuto SequenceActivateResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObject4DeliveryModeForReview SequenceActivateResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObject4ModeTemplate SequenceActivateResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceActivateResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceActivateResponseDefinitionStepObject4TypeLinkedinMessage SequenceActivateResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceActivateResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObject5DeliveryModeAuto SequenceActivateResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObject5DeliveryModeForReview SequenceActivateResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObject5ModeTemplate SequenceActivateResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceActivateResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceActivateResponseDefinitionStepObject5TypeLinkedinInvite SequenceActivateResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceActivateResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceActivateResponseDefinitionStepObject6TypeWait SequenceActivateResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceActivateResponseDefinitionStepObject6TypeWaitForConnection SequenceActivateResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceActivateResponseDefinitionStepObject6UnitDay SequenceActivateResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceActivateResponseDefinitionStepObject6UnitMinute SequenceActivateResponseDefinitionStepObject6Unit = "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 SequenceActivateResponseObjectType`

    Always `sequence`.

    - `const SequenceActivateResponseObjectTypeSequence SequenceActivateResponseObjectType = "sequence"`

  - `Reviewers []SequenceActivateResponseReviewer`

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

      Always `member`.

      - `const SequenceActivateResponseReviewerObjectTypeMember SequenceActivateResponseReviewerObjectType = "member"`

  - `Senders []SequenceActivateResponseSender`

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

      Always `sender`.

      - `const SequenceActivateResponseSenderObjectTypeSender SequenceActivateResponseSenderObjectType = "sender"`

  - `Status SequenceActivateResponseStatus`

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

    - `const SequenceActivateResponseStatusDraft SequenceActivateResponseStatus = "DRAFT"`

    - `const SequenceActivateResponseStatusActive SequenceActivateResponseStatus = "ACTIVE"`

    - `const SequenceActivateResponseStatusDeactivated SequenceActivateResponseStatus = "DEACTIVATED"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceActivateResponse, err := client.Sequence.Activate(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequenceActivateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceActivateResponse.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"
}
```

## Deactivate a sequence

`client.Sequence.Deactivate(ctx, id, body) (*SequenceDeactivateResponse, error)`

**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 string`

  Unique identifier of the sequence.

- `body SequenceDeactivateParams`

  - `Body param.Field[SequenceDeactivateParamsBody]`

### Returns

- `type SequenceDeactivateResponse struct{…}`

  - `ID string`

    Unique identifier of the sequence.

  - `Channels []string`

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

    - `const SequenceDeactivateResponseChannelEmail SequenceDeactivateResponseChannel = "EMAIL"`

    - `const SequenceDeactivateResponseChannelLinkedin SequenceDeactivateResponseChannel = "LINKEDIN"`

  - `CreatedAt string`

    ISO 8601 creation timestamp.

  - `Definition SequenceDeactivateResponseDefinition`

    Published configuration, or null before the first publish.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceDeactivateResponseDefinitionMessaging`

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

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

      - `Email SequenceDeactivateResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceDeactivateResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceDeactivateResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceDeactivateResponseDefinitionPriorityHigh SequenceDeactivateResponseDefinitionPriority = "HIGH"`

      - `const SequenceDeactivateResponseDefinitionPriorityNormal SequenceDeactivateResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceDeactivateResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceDeactivateResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceDeactivateResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObjectDeliveryModeAuto SequenceDeactivateResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObjectDeliveryModeForReview SequenceDeactivateResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObjectModeAgent SequenceDeactivateResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObjectTypeEmail SequenceDeactivateResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceDeactivateResponseDefinitionStepObjectTypeLinkedinMessage SequenceDeactivateResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceDeactivateResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject2DeliveryModeAuto SequenceDeactivateResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObject2DeliveryModeForReview SequenceDeactivateResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject2ModeAgent SequenceDeactivateResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObject2TypeLinkedinInvite SequenceDeactivateResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceDeactivateResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject3DeliveryModeAuto SequenceDeactivateResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObject3DeliveryModeForReview SequenceDeactivateResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject3ModeTemplate SequenceDeactivateResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceDeactivateResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObject3TypeEmail SequenceDeactivateResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceDeactivateResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject4DeliveryModeAuto SequenceDeactivateResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObject4DeliveryModeForReview SequenceDeactivateResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject4ModeTemplate SequenceDeactivateResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceDeactivateResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObject4TypeLinkedinMessage SequenceDeactivateResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceDeactivateResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject5DeliveryModeAuto SequenceDeactivateResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObject5DeliveryModeForReview SequenceDeactivateResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject5ModeTemplate SequenceDeactivateResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceDeactivateResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObject5TypeLinkedinInvite SequenceDeactivateResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceDeactivateResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject6TypeWait SequenceDeactivateResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceDeactivateResponseDefinitionStepObject6TypeWaitForConnection SequenceDeactivateResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceDeactivateResponseDefinitionStepObject6UnitDay SequenceDeactivateResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceDeactivateResponseDefinitionStepObject6UnitMinute SequenceDeactivateResponseDefinitionStepObject6Unit = "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 SequenceDeactivateResponseObjectType`

    Always `sequence`.

    - `const SequenceDeactivateResponseObjectTypeSequence SequenceDeactivateResponseObjectType = "sequence"`

  - `Reviewers []SequenceDeactivateResponseReviewer`

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

      Always `member`.

      - `const SequenceDeactivateResponseReviewerObjectTypeMember SequenceDeactivateResponseReviewerObjectType = "member"`

  - `Senders []SequenceDeactivateResponseSender`

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

      Always `sender`.

      - `const SequenceDeactivateResponseSenderObjectTypeSender SequenceDeactivateResponseSenderObjectType = "sender"`

  - `Status SequenceDeactivateResponseStatus`

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

    - `const SequenceDeactivateResponseStatusDraft SequenceDeactivateResponseStatus = "DRAFT"`

    - `const SequenceDeactivateResponseStatusActive SequenceDeactivateResponseStatus = "ACTIVE"`

    - `const SequenceDeactivateResponseStatusDeactivated SequenceDeactivateResponseStatus = "DEACTIVATED"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceDeactivateResponse, err := client.Sequence.Deactivate(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequenceDeactivateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceDeactivateResponse.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"
}
```

## Retrieve a sequence draft

`client.Sequence.GetDraft(ctx, id) (*SequenceRetrieveDraftResponse, error)`

**get** `/v1/sequences/{id}/draft`

Retrieves the sequence’s open draft, the same one editors see in Lightfield. Returns 404 `draft_not_found` when no draft is open.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

### Returns

- `type SequenceRetrieveDraftResponse struct{…}`

  - `Channels []string`

    Channels the draft's steps send on.

    - `const SequenceRetrieveDraftResponseChannelEmail SequenceRetrieveDraftResponseChannel = "EMAIL"`

    - `const SequenceRetrieveDraftResponseChannelLinkedin SequenceRetrieveDraftResponseChannel = "LINKEDIN"`

  - `Definition SequenceRetrieveDraftResponseDefinition`

    The draft configuration, in the same shape as a published definition.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceRetrieveDraftResponseDefinitionMessaging`

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

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

      - `Email SequenceRetrieveDraftResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceRetrieveDraftResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceRetrieveDraftResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceRetrieveDraftResponseDefinitionPriorityHigh SequenceRetrieveDraftResponseDefinitionPriority = "HIGH"`

      - `const SequenceRetrieveDraftResponseDefinitionPriorityNormal SequenceRetrieveDraftResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceRetrieveDraftResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceRetrieveDraftResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceRetrieveDraftResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectDeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectDeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectModeAgent SequenceRetrieveDraftResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectTypeEmail SequenceRetrieveDraftResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectTypeLinkedinMessage SequenceRetrieveDraftResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject2DeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject2DeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject2ModeAgent SequenceRetrieveDraftResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject2TypeLinkedinInvite SequenceRetrieveDraftResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject3DeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject3DeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject3ModeTemplate SequenceRetrieveDraftResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveDraftResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject3TypeEmail SequenceRetrieveDraftResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject4DeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject4DeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject4ModeTemplate SequenceRetrieveDraftResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveDraftResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject4TypeLinkedinMessage SequenceRetrieveDraftResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject5DeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject5DeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject5ModeTemplate SequenceRetrieveDraftResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveDraftResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject5TypeLinkedinInvite SequenceRetrieveDraftResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject6TypeWait SequenceRetrieveDraftResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject6TypeWaitForConnection SequenceRetrieveDraftResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject6UnitDay SequenceRetrieveDraftResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject6UnitMinute SequenceRetrieveDraftResponseDefinitionStepObject6Unit = "MINUTE"`

  - `Name string`

    Name the sequence takes when the draft is published.

  - `PublishWarnings []SequenceRetrieveDraftResponsePublishWarning`

    What publishing this draft would change for contacts already in the sequence; empty when nothing is affected. Before the first publish, the only possible warning is a proposed sender that was archived and would be left off.

    - `Code string`

      What publishing would change.

      - `const SequenceRetrieveDraftResponsePublishWarningCodeDelayShortened SequenceRetrieveDraftResponsePublishWarningCode = "delay_shortened"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeDelayLengthened SequenceRetrieveDraftResponsePublishWarningCode = "delay_lengthened"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeConnectionWaitShortened SequenceRetrieveDraftResponsePublishWarningCode = "connection_wait_shortened"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeConnectionWaitLengthened SequenceRetrieveDraftResponsePublishWarningCode = "connection_wait_lengthened"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeSendScheduleChanged SequenceRetrieveDraftResponsePublishWarningCode = "send_schedule_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeSendConfigurationChanged SequenceRetrieveDraftResponsePublishWarningCode = "send_configuration_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeSendPriorityChanged SequenceRetrieveDraftResponsePublishWarningCode = "send_priority_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeSendersChanged SequenceRetrieveDraftResponsePublishWarningCode = "senders_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeEmailSenderPoolEmptied SequenceRetrieveDraftResponsePublishWarningCode = "email_sender_pool_emptied"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeLinkedinAccountPoolEmptied SequenceRetrieveDraftResponsePublishWarningCode = "linkedin_account_pool_emptied"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeAssignedSenderRemoved SequenceRetrieveDraftResponsePublishWarningCode = "assigned_sender_removed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeDeliveryBecameAutomatic SequenceRetrieveDraftResponsePublishWarningCode = "delivery_became_automatic"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeInviteNoteEnabled SequenceRetrieveDraftResponsePublishWarningCode = "invite_note_enabled"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeInviteNoteDisabled SequenceRetrieveDraftResponsePublishWarningCode = "invite_note_disabled"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeStepInserted SequenceRetrieveDraftResponsePublishWarningCode = "step_inserted"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeAutomaticSendStepInserted SequenceRetrieveDraftResponsePublishWarningCode = "automatic_send_step_inserted"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeStepRemoved SequenceRetrieveDraftResponsePublishWarningCode = "step_removed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeStepTypeChanged SequenceRetrieveDraftResponsePublishWarningCode = "step_type_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeStepOrderChanged SequenceRetrieveDraftResponsePublishWarningCode = "step_order_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeFullIdentityRewrite SequenceRetrieveDraftResponsePublishWarningCode = "full_identity_rewrite"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeLowIdentityOverlap SequenceRetrieveDraftResponsePublishWarningCode = "low_identity_overlap"`

    - `Message string`

      What would change, in plain language.

    - `Severity string`

      `destructive` when contacts already in the sequence may skip, repeat or receive a step they would not have; `warning` otherwise.

      - `const SequenceRetrieveDraftResponsePublishWarningSeverityWarning SequenceRetrieveDraftResponsePublishWarningSeverity = "warning"`

      - `const SequenceRetrieveDraftResponsePublishWarningSeverityDestructive SequenceRetrieveDraftResponsePublishWarningSeverity = "destructive"`

    - `StepIDs []string`

      The steps involved; empty for a sequence-wide change.

  - `Reviewers []SequenceRetrieveDraftResponseReviewer`

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

      Always `member`.

      - `const SequenceRetrieveDraftResponseReviewerObjectTypeMember SequenceRetrieveDraftResponseReviewerObjectType = "member"`

  - `Senders []SequenceRetrieveDraftResponseSender`

    The senders this draft will publish; new contacts rotate across them. Until a save changes it, this is the sequence’s live list. An archived sender stays listed but never sends; any change to the list drops it.

    - `ID string`

      ID of the sender.

    - `ObjectType string`

      Always `sender`.

      - `const SequenceRetrieveDraftResponseSenderObjectTypeSender SequenceRetrieveDraftResponseSenderObjectType = "sender"`

  - `SequenceID string`

    The sequence this draft belongs to.

  - `UpdatedAt string`

    When the draft last changed.

  - `Version string`

    Opaque token for the current state of the draft. Send it as `expectedVersion` on the next save, publish or discard; it changes whenever anyone edits the draft.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceRetrieveDraftResponse, err := client.Sequence.GetDraft(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceRetrieveDraftResponse.Channels)
}
```

#### Response

```json
{
  "channels": [
    "EMAIL"
  ],
  "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"
      }
    ]
  },
  "name": "name",
  "publishWarnings": [
    {
      "code": "delay_shortened",
      "message": "message",
      "severity": "warning",
      "stepIds": [
        "string"
      ]
    }
  ],
  "reviewers": [
    {
      "id": "x",
      "objectType": "member"
    }
  ],
  "senders": [
    {
      "id": "x",
      "objectType": "sender"
    }
  ],
  "sequenceId": "sequenceId",
  "updatedAt": "updatedAt",
  "version": "version"
}
```

## Update a sequence draft

`client.Sequence.UpdateDraft(ctx, id, body) (*SequenceUpdateDraftResponse, error)`

**post** `/v1/sequences/{id}/draft`

Saves changes to the sequence’s open draft, or opens one from the published version when none is open. Only the fields sent are changed; `definition.steps` replaces the whole step list. Changes take effect when the draft is published. See <u>[Using sequences with the API](/sequences/using-the-api#editing-a-draft)</u> for the draft and version model.

Returns 409 when `expectedVersion` is not the open draft’s `version`, or for a `steps` save while the draft has unfinished edits in Lightfield; retrieve the draft and retry. A refused save changes nothing: 400 `invalid_configuration` lists every problem under `issues`, 400 `referenced_resource_missing` names a reviewer or sender that does not exist, and a value outside its field’s documented bounds returns 400 naming the field in `param`. See <u>[Sequence errors](/using-the-api/errors/#sequence-errors)</u>.

**[Required scope](/using-the-api/scopes/):** `sequences:update`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

- `body SequenceUpdateDraftParams`

  - `Definition param.Field[SequenceUpdateDraftParamsDefinition]`

    Fields to change. Omitted fields are unchanged.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceUpdateDraftParamsDefinitionMessaging`

      Messaging inputs that frame every step. Omitted fields are unchanged; null clears a field.

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

      How the whole sequence paces each step type it sends, keyed by sequence step type. Omitted step types are unchanged.

      - `Email SequenceUpdateDraftParamsDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceUpdateDraftParamsDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceUpdateDraftParamsDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceUpdateDraftParamsDefinitionPriorityHigh SequenceUpdateDraftParamsDefinitionPriority = "HIGH"`

      - `const SequenceUpdateDraftParamsDefinitionPriorityNormal SequenceUpdateDraftParamsDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceUpdateDraftParamsDefinitionSendWindow`

      When the sequence may send. Omitted fields are unchanged.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceUpdateDraftParamsDefinitionStepUnion`

      The complete ordered step list, replacing the current one. Keep a step by sending its `id`; omit `id` for a new step.

      - `type SequenceUpdateDraftParamsDefinitionStepObject struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftParamsDefinitionStepObjectDeliveryModeAuto SequenceUpdateDraftParamsDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftParamsDefinitionStepObjectDeliveryModeForReview SequenceUpdateDraftParamsDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftParamsDefinitionStepObjectTypeEmail SequenceUpdateDraftParamsDefinitionStepObjectType = "EMAIL"`

          - `const SequenceUpdateDraftParamsDefinitionStepObjectTypeLinkedinMessage SequenceUpdateDraftParamsDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

        - `ID string`

          ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceUpdateDraftParamsDefinitionStepObjectModeAgent SequenceUpdateDraftParamsDefinitionStepObjectMode = "AGENT"`

      - `type SequenceUpdateDraftParamsDefinitionStepObject2 struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftParamsDefinitionStepObject2DeliveryModeAuto SequenceUpdateDraftParamsDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftParamsDefinitionStepObject2DeliveryModeForReview SequenceUpdateDraftParamsDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftParamsDefinitionStepObject2TypeLinkedinInvite SequenceUpdateDraftParamsDefinitionStepObject2Type = "LINKEDIN_INVITE"`

        - `ID string`

          ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.

        - `IncludeNote bool`

          Whether the connection request carries a note. Omit to keep the current setting; a new step defaults to false.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceUpdateDraftParamsDefinitionStepObject2ModeAgent SequenceUpdateDraftParamsDefinitionStepObject2Mode = "AGENT"`

      - `type SequenceUpdateDraftParamsDefinitionStepObject3 struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftParamsDefinitionStepObject3DeliveryModeAuto SequenceUpdateDraftParamsDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftParamsDefinitionStepObject3DeliveryModeForReview SequenceUpdateDraftParamsDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftParamsDefinitionStepObject3Template`

          The email every contact receives. Requires template steps for the workspace.

          - `Body string`

            Email body as Markdown; paragraphs, bold, italics, links and lists keep their formatting. Leave out the sign-off and signature, which are added when the message is written. A variable cannot be part of a link address. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

          - `Subject string`

            Plain-text subject line. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftParamsDefinitionStepObject3TypeEmail SequenceUpdateDraftParamsDefinitionStepObject3Type = "EMAIL"`

        - `ID string`

          ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceUpdateDraftParamsDefinitionStepObject3ModeTemplate SequenceUpdateDraftParamsDefinitionStepObject3Mode = "TEMPLATE"`

      - `type SequenceUpdateDraftParamsDefinitionStepObject4 struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftParamsDefinitionStepObject4DeliveryModeAuto SequenceUpdateDraftParamsDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftParamsDefinitionStepObject4DeliveryModeForReview SequenceUpdateDraftParamsDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftParamsDefinitionStepObject4Template`

          The message every contact receives; for an invite, its connection note, sent only with `includeNote` and otherwise left empty. Requires template steps for the workspace.

          - `Body string`

            Plain-text message. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftParamsDefinitionStepObject4TypeLinkedinMessage SequenceUpdateDraftParamsDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

        - `ID string`

          ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceUpdateDraftParamsDefinitionStepObject4ModeTemplate SequenceUpdateDraftParamsDefinitionStepObject4Mode = "TEMPLATE"`

      - `type SequenceUpdateDraftParamsDefinitionStepObject5 struct{…}`

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftParamsDefinitionStepObject5DeliveryModeAuto SequenceUpdateDraftParamsDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftParamsDefinitionStepObject5DeliveryModeForReview SequenceUpdateDraftParamsDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftParamsDefinitionStepObject5Template`

          The message every contact receives; for an invite, its connection note, sent only with `includeNote` and otherwise left empty. Requires template steps for the workspace.

          - `Body string`

            Plain-text message. Write each variable as {{ coalesce(<variable>, "fallback") }}, with a fallback for contacts missing the value. A variable reads a contact field as {attr:<id>}, the contact's first or last name as {col:firstName} or {col:lastName}, the contact's first account's field as {rel:account.<id>}, that account's name as {rel:account.col:name}, and the sender's name or email as {rel:sender.col:name} or {rel:sender.col:email}; a SINGLE_SELECT field reads its option's label, as {attr:<id>.label} or {rel:account.<id>.label}. <id> is the literal id of a CrmContact or CrmAccount field in the CRM schema whose type is one of TEXT, NUMBER, CURRENCY, DATETIME, SINGLE_SELECT, FULL_NAME, EMAIL, URL; never a slug, a name, or an id starting with __synthetic_. Nothing else is a variable: leave such a value out rather than reading a different field. A {{ }} that is not a variable would send as written, so it is refused. A field's <id> may be the `ad_` ID the field-definitions endpoints list.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftParamsDefinitionStepObject5TypeLinkedinInvite SequenceUpdateDraftParamsDefinitionStepObject5Type = "LINKEDIN_INVITE"`

        - `ID string`

          ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.

        - `IncludeNote bool`

          Whether the connection request carries a note. Omit to keep the current setting; a new step defaults to false.

        - `Mode string`

          How each message is written: `AGENT` composes it from `prompt`; `TEMPLATE` sends `template` to every contact, with its variables filled in. Optional: the content decides, a `prompt` for `AGENT` and a `template` for `TEMPLATE`. A kept template step sent with a `prompt` is refused unless `mode` is `AGENT`, so its template is never dropped by accident.

          - `const SequenceUpdateDraftParamsDefinitionStepObject5ModeTemplate SequenceUpdateDraftParamsDefinitionStepObject5Mode = "TEMPLATE"`

      - `type SequenceUpdateDraftParamsDefinitionStepObject6 struct{…}`

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceUpdateDraftParamsDefinitionStepObject6TypeWait SequenceUpdateDraftParamsDefinitionStepObject6Type = "WAIT"`

          - `const SequenceUpdateDraftParamsDefinitionStepObject6TypeWaitForConnection SequenceUpdateDraftParamsDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceUpdateDraftParamsDefinitionStepObject6UnitDay SequenceUpdateDraftParamsDefinitionStepObject6Unit = "DAY"`

          - `const SequenceUpdateDraftParamsDefinitionStepObject6UnitMinute SequenceUpdateDraftParamsDefinitionStepObject6Unit = "MINUTE"`

        - `ID string`

          ID of a step in the current draft to keep. Omit for a new step. Kept steps must stay in their relative order and keep their type.

  - `ExpectedVersion param.Field[string]`

    The open draft’s `version` as last read. Required when a draft is open; omit it only when none is, to start one from the published version.

  - `Name param.Field[string]`

    Name of the sequence.

  - `Reviewers param.Field[SequenceUpdateDraftParamsReviewers]`

    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. Changes the list by adding and removing members; omit to keep it.

    - `Add []string`

      Member IDs of active members to add. A member already listed is unchanged.

    - `Remove []string`

      Member IDs to remove, including members who have left the workspace. A member not listed is unchanged.

  - `Senders param.Field[SequenceUpdateDraftParamsSenders]`

    The senders this sequence sends from; new contacts rotate across them. Changes the list by adding and removing senders; omit to keep it.

    - `Add []string`

      Sender IDs of unarchived senders to add. A sender already listed is unchanged.

    - `Remove []string`

      Sender IDs to remove, including archived senders. A sender not listed is unchanged.

### Returns

- `type SequenceUpdateDraftResponse struct{…}`

  - `Channels []string`

    Channels the draft's steps send on.

    - `const SequenceUpdateDraftResponseChannelEmail SequenceUpdateDraftResponseChannel = "EMAIL"`

    - `const SequenceUpdateDraftResponseChannelLinkedin SequenceUpdateDraftResponseChannel = "LINKEDIN"`

  - `Definition SequenceUpdateDraftResponseDefinition`

    The draft configuration, in the same shape as a published definition.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceUpdateDraftResponseDefinitionMessaging`

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

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

      - `Email SequenceUpdateDraftResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceUpdateDraftResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceUpdateDraftResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceUpdateDraftResponseDefinitionPriorityHigh SequenceUpdateDraftResponseDefinitionPriority = "HIGH"`

      - `const SequenceUpdateDraftResponseDefinitionPriorityNormal SequenceUpdateDraftResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceUpdateDraftResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceUpdateDraftResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceUpdateDraftResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObjectDeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObjectDeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObjectModeAgent SequenceUpdateDraftResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObjectTypeEmail SequenceUpdateDraftResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceUpdateDraftResponseDefinitionStepObjectTypeLinkedinMessage SequenceUpdateDraftResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject2DeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject2DeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject2ModeAgent SequenceUpdateDraftResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObject2TypeLinkedinInvite SequenceUpdateDraftResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject3DeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject3DeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject3ModeTemplate SequenceUpdateDraftResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObject3TypeEmail SequenceUpdateDraftResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject4DeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject4DeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject4ModeTemplate SequenceUpdateDraftResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObject4TypeLinkedinMessage SequenceUpdateDraftResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject5DeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject5DeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject5ModeTemplate SequenceUpdateDraftResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObject5TypeLinkedinInvite SequenceUpdateDraftResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject6TypeWait SequenceUpdateDraftResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject6TypeWaitForConnection SequenceUpdateDraftResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceUpdateDraftResponseDefinitionStepObject6UnitDay SequenceUpdateDraftResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject6UnitMinute SequenceUpdateDraftResponseDefinitionStepObject6Unit = "MINUTE"`

  - `Name string`

    Name the sequence takes when the draft is published.

  - `PublishWarnings []SequenceUpdateDraftResponsePublishWarning`

    What publishing this draft would change for contacts already in the sequence; empty when nothing is affected. Before the first publish, the only possible warning is a proposed sender that was archived and would be left off.

    - `Code string`

      What publishing would change.

      - `const SequenceUpdateDraftResponsePublishWarningCodeDelayShortened SequenceUpdateDraftResponsePublishWarningCode = "delay_shortened"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeDelayLengthened SequenceUpdateDraftResponsePublishWarningCode = "delay_lengthened"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeConnectionWaitShortened SequenceUpdateDraftResponsePublishWarningCode = "connection_wait_shortened"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeConnectionWaitLengthened SequenceUpdateDraftResponsePublishWarningCode = "connection_wait_lengthened"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeSendScheduleChanged SequenceUpdateDraftResponsePublishWarningCode = "send_schedule_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeSendConfigurationChanged SequenceUpdateDraftResponsePublishWarningCode = "send_configuration_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeSendPriorityChanged SequenceUpdateDraftResponsePublishWarningCode = "send_priority_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeSendersChanged SequenceUpdateDraftResponsePublishWarningCode = "senders_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeEmailSenderPoolEmptied SequenceUpdateDraftResponsePublishWarningCode = "email_sender_pool_emptied"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeLinkedinAccountPoolEmptied SequenceUpdateDraftResponsePublishWarningCode = "linkedin_account_pool_emptied"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeAssignedSenderRemoved SequenceUpdateDraftResponsePublishWarningCode = "assigned_sender_removed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeDeliveryBecameAutomatic SequenceUpdateDraftResponsePublishWarningCode = "delivery_became_automatic"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeInviteNoteEnabled SequenceUpdateDraftResponsePublishWarningCode = "invite_note_enabled"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeInviteNoteDisabled SequenceUpdateDraftResponsePublishWarningCode = "invite_note_disabled"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeStepInserted SequenceUpdateDraftResponsePublishWarningCode = "step_inserted"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeAutomaticSendStepInserted SequenceUpdateDraftResponsePublishWarningCode = "automatic_send_step_inserted"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeStepRemoved SequenceUpdateDraftResponsePublishWarningCode = "step_removed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeStepTypeChanged SequenceUpdateDraftResponsePublishWarningCode = "step_type_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeStepOrderChanged SequenceUpdateDraftResponsePublishWarningCode = "step_order_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeFullIdentityRewrite SequenceUpdateDraftResponsePublishWarningCode = "full_identity_rewrite"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeLowIdentityOverlap SequenceUpdateDraftResponsePublishWarningCode = "low_identity_overlap"`

    - `Message string`

      What would change, in plain language.

    - `Severity string`

      `destructive` when contacts already in the sequence may skip, repeat or receive a step they would not have; `warning` otherwise.

      - `const SequenceUpdateDraftResponsePublishWarningSeverityWarning SequenceUpdateDraftResponsePublishWarningSeverity = "warning"`

      - `const SequenceUpdateDraftResponsePublishWarningSeverityDestructive SequenceUpdateDraftResponsePublishWarningSeverity = "destructive"`

    - `StepIDs []string`

      The steps involved; empty for a sequence-wide change.

  - `Reviewers []SequenceUpdateDraftResponseReviewer`

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

      Always `member`.

      - `const SequenceUpdateDraftResponseReviewerObjectTypeMember SequenceUpdateDraftResponseReviewerObjectType = "member"`

  - `Senders []SequenceUpdateDraftResponseSender`

    The senders this draft will publish; new contacts rotate across them. Until a save changes it, this is the sequence’s live list. An archived sender stays listed but never sends; any change to the list drops it.

    - `ID string`

      ID of the sender.

    - `ObjectType string`

      Always `sender`.

      - `const SequenceUpdateDraftResponseSenderObjectTypeSender SequenceUpdateDraftResponseSenderObjectType = "sender"`

  - `SequenceID string`

    The sequence this draft belongs to.

  - `UpdatedAt string`

    When the draft last changed.

  - `Version string`

    Opaque token for the current state of the draft. Send it as `expectedVersion` on the next save, publish or discard; it changes whenever anyone edits the draft.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceUpdateDraftResponse, err := client.Sequence.UpdateDraft(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequenceUpdateDraftParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceUpdateDraftResponse.Channels)
}
```

#### Response

```json
{
  "channels": [
    "EMAIL"
  ],
  "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"
      }
    ]
  },
  "name": "name",
  "publishWarnings": [
    {
      "code": "delay_shortened",
      "message": "message",
      "severity": "warning",
      "stepIds": [
        "string"
      ]
    }
  ],
  "reviewers": [
    {
      "id": "x",
      "objectType": "member"
    }
  ],
  "senders": [
    {
      "id": "x",
      "objectType": "sender"
    }
  ],
  "sequenceId": "sequenceId",
  "updatedAt": "updatedAt",
  "version": "version"
}
```

## Publish a sequence draft

`client.Sequence.PublishDraft(ctx, id, body) (*SequencePublishDraftResponse, error)`

**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 <u>[Sequence errors](/using-the-api/errors/#sequence-errors)</u> for what each code means and how to resolve it.

**[Required scope](/using-the-api/scopes/):** `sequences:update`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

- `body SequencePublishDraftParams`

  - `ExpectedVersion param.Field[string]`

    The open draft’s `version` as last read.

### Returns

- `type SequencePublishDraftResponse struct{…}`

  - `ID string`

    Unique identifier of the sequence.

  - `Channels []string`

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

    - `const SequencePublishDraftResponseChannelEmail SequencePublishDraftResponseChannel = "EMAIL"`

    - `const SequencePublishDraftResponseChannelLinkedin SequencePublishDraftResponseChannel = "LINKEDIN"`

  - `CreatedAt string`

    ISO 8601 creation timestamp.

  - `Definition SequencePublishDraftResponseDefinition`

    Published configuration, or null before the first publish.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequencePublishDraftResponseDefinitionMessaging`

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

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

      - `Email SequencePublishDraftResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequencePublishDraftResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequencePublishDraftResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequencePublishDraftResponseDefinitionPriorityHigh SequencePublishDraftResponseDefinitionPriority = "HIGH"`

      - `const SequencePublishDraftResponseDefinitionPriorityNormal SequencePublishDraftResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequencePublishDraftResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequencePublishDraftResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequencePublishDraftResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObjectDeliveryModeAuto SequencePublishDraftResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObjectDeliveryModeForReview SequencePublishDraftResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObjectModeAgent SequencePublishDraftResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObjectTypeEmail SequencePublishDraftResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequencePublishDraftResponseDefinitionStepObjectTypeLinkedinMessage SequencePublishDraftResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequencePublishDraftResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject2DeliveryModeAuto SequencePublishDraftResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObject2DeliveryModeForReview SequencePublishDraftResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject2ModeAgent SequencePublishDraftResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObject2TypeLinkedinInvite SequencePublishDraftResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequencePublishDraftResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject3DeliveryModeAuto SequencePublishDraftResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObject3DeliveryModeForReview SequencePublishDraftResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject3ModeTemplate SequencePublishDraftResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequencePublishDraftResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObject3TypeEmail SequencePublishDraftResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequencePublishDraftResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject4DeliveryModeAuto SequencePublishDraftResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObject4DeliveryModeForReview SequencePublishDraftResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject4ModeTemplate SequencePublishDraftResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequencePublishDraftResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObject4TypeLinkedinMessage SequencePublishDraftResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequencePublishDraftResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject5DeliveryModeAuto SequencePublishDraftResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObject5DeliveryModeForReview SequencePublishDraftResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject5ModeTemplate SequencePublishDraftResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequencePublishDraftResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObject5TypeLinkedinInvite SequencePublishDraftResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequencePublishDraftResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject6TypeWait SequencePublishDraftResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequencePublishDraftResponseDefinitionStepObject6TypeWaitForConnection SequencePublishDraftResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequencePublishDraftResponseDefinitionStepObject6UnitDay SequencePublishDraftResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequencePublishDraftResponseDefinitionStepObject6UnitMinute SequencePublishDraftResponseDefinitionStepObject6Unit = "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 SequencePublishDraftResponseObjectType`

    Always `sequence`.

    - `const SequencePublishDraftResponseObjectTypeSequence SequencePublishDraftResponseObjectType = "sequence"`

  - `Reviewers []SequencePublishDraftResponseReviewer`

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

      Always `member`.

      - `const SequencePublishDraftResponseReviewerObjectTypeMember SequencePublishDraftResponseReviewerObjectType = "member"`

  - `Senders []SequencePublishDraftResponseSender`

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

      Always `sender`.

      - `const SequencePublishDraftResponseSenderObjectTypeSender SequencePublishDraftResponseSenderObjectType = "sender"`

  - `Status SequencePublishDraftResponseStatus`

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

    - `const SequencePublishDraftResponseStatusDraft SequencePublishDraftResponseStatus = "DRAFT"`

    - `const SequencePublishDraftResponseStatusActive SequencePublishDraftResponseStatus = "ACTIVE"`

    - `const SequencePublishDraftResponseStatusDeactivated SequencePublishDraftResponseStatus = "DEACTIVATED"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequencePublishDraftResponse, err := client.Sequence.PublishDraft(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequencePublishDraftParams{
      ExpectedVersion: "expectedVersion",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequencePublishDraftResponse.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"
}
```

## List template variables

`client.Sequence.ListTemplateVariables(ctx) (*SequenceListTemplateVariablesResponse, error)`

**get** `/v1/sequences/template/variables`

Lists the variables a sequence template may use: the first and last name, the contact’s and its first account’s fields of a type a message can print, and the sender’s name and email. Use an entry’s `ref` in a send step’s subject or body. A variable needs a fallback for contacts missing the value: `{{ {attr:ad_…} }}` is written `{{ coalesce({attr:ad_…}, "fallback") }}`, and one without a fallback is refused when the draft is saved. Anything else inside `{{ }}` is refused too.

**[Required scopes](/using-the-api/scopes/):** `sequences:read`, `contacts:read` and `accounts:read`

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

### Returns

- `type SequenceListTemplateVariablesResponse struct{…}`

  - `Data []SequenceListTemplateVariablesResponseData`

    - `Field SequenceListTemplateVariablesResponseDataField`

      The field the variable reads; null for built-in variables.

      - `ID string`

        The `ad_` id of the field, as the field-definitions endpoints list it.

      - `ValueType string`

        Type of the field.

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeAddress SequenceListTemplateVariablesResponseDataFieldValueType = "ADDRESS"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeCheckbox SequenceListTemplateVariablesResponseDataFieldValueType = "CHECKBOX"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeCurrency SequenceListTemplateVariablesResponseDataFieldValueType = "CURRENCY"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeDatetime SequenceListTemplateVariablesResponseDataFieldValueType = "DATETIME"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeEmail SequenceListTemplateVariablesResponseDataFieldValueType = "EMAIL"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeFullName SequenceListTemplateVariablesResponseDataFieldValueType = "FULL_NAME"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeMarkdown SequenceListTemplateVariablesResponseDataFieldValueType = "MARKDOWN"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeMultiSelect SequenceListTemplateVariablesResponseDataFieldValueType = "MULTI_SELECT"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeNumber SequenceListTemplateVariablesResponseDataFieldValueType = "NUMBER"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeSingleSelect SequenceListTemplateVariablesResponseDataFieldValueType = "SINGLE_SELECT"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeSocialHandle SequenceListTemplateVariablesResponseDataFieldValueType = "SOCIAL_HANDLE"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeTelephone SequenceListTemplateVariablesResponseDataFieldValueType = "TELEPHONE"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeText SequenceListTemplateVariablesResponseDataFieldValueType = "TEXT"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeURL SequenceListTemplateVariablesResponseDataFieldValueType = "URL"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeHTML SequenceListTemplateVariablesResponseDataFieldValueType = "HTML"`

    - `Group string`

      Whose value the variable prints: the enrolled contact, its first account, or the step’s sender.

      - `const SequenceListTemplateVariablesResponseDataGroupContact SequenceListTemplateVariablesResponseDataGroup = "contact"`

      - `const SequenceListTemplateVariablesResponseDataGroupAccount SequenceListTemplateVariablesResponseDataGroup = "account"`

      - `const SequenceListTemplateVariablesResponseDataGroupSender SequenceListTemplateVariablesResponseDataGroup = "sender"`

    - `Label string`

      Name of the variable, as the editor shows it.

    - `Ref string`

      The variable, e.g. `{{ {attr:ad_…} }}`. A variable needs a fallback for contacts missing the value: `{{ {attr:ad_…} }}` is written `{{ coalesce({attr:ad_…}, "fallback") }}`, and one without a fallback is refused when the draft is saved.

  - `Object SequenceListTemplateVariablesResponseObject`

    - `const SequenceListTemplateVariablesResponseObjectList SequenceListTemplateVariablesResponseObject = "list"`

  - `TotalCount int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceListTemplateVariablesResponse, err := client.Sequence.ListTemplateVariables(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceListTemplateVariablesResponse.Data)
}
```

#### Response

```json
{
  "data": [
    {
      "field": {
        "id": "id",
        "valueType": "ADDRESS"
      },
      "group": "contact",
      "label": "label",
      "ref": "ref"
    }
  ],
  "object": "list",
  "totalCount": -9007199254740991
}
```

## Discard a sequence draft

`client.Sequence.DiscardDraft(ctx, id, body) (*SequenceDiscardDraftResponse, error)`

**post** `/v1/sequences/{id}/draft/discard`

Discards the open draft at `expectedVersion`. A published sequence keeps its published version. A sequence that has never been published is deleted with its draft, and `sequenceDeleted` is true. Returns 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.

**[Required scope](/using-the-api/scopes/):** `sequences:update`

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

### Parameters

- `id string`

  Unique identifier of the sequence.

- `body SequenceDiscardDraftParams`

  - `ExpectedVersion param.Field[string]`

    The open draft’s `version` as last read.

### Returns

- `type SequenceDiscardDraftResponse struct{…}`

  - `SequenceDeleted bool`

    True when the sequence had never been published, so discarding its only draft deleted it.

  - `SequenceID string`

    The sequence whose draft was discarded.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceDiscardDraftResponse, err := client.Sequence.DiscardDraft(
    context.TODO(),
    "id",
    githubcomlightfldlightfieldgo.SequenceDiscardDraftParams{
      ExpectedVersion: "expectedVersion",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sequenceDiscardDraftResponse.SequenceDeleted)
}
```

#### Response

```json
{
  "sequenceDeleted": true,
  "sequenceId": "sequenceId"
}
```

## Domain Types

### Sequence Activate Response

- `type SequenceActivateResponse struct{…}`

  - `ID string`

    Unique identifier of the sequence.

  - `Channels []string`

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

    - `const SequenceActivateResponseChannelEmail SequenceActivateResponseChannel = "EMAIL"`

    - `const SequenceActivateResponseChannelLinkedin SequenceActivateResponseChannel = "LINKEDIN"`

  - `CreatedAt string`

    ISO 8601 creation timestamp.

  - `Definition SequenceActivateResponseDefinition`

    Published configuration, or null before the first publish.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceActivateResponseDefinitionMessaging`

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

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

      - `Email SequenceActivateResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceActivateResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceActivateResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceActivateResponseDefinitionPriorityHigh SequenceActivateResponseDefinitionPriority = "HIGH"`

      - `const SequenceActivateResponseDefinitionPriorityNormal SequenceActivateResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceActivateResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceActivateResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceActivateResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObjectDeliveryModeAuto SequenceActivateResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObjectDeliveryModeForReview SequenceActivateResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObjectModeAgent SequenceActivateResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceActivateResponseDefinitionStepObjectTypeEmail SequenceActivateResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceActivateResponseDefinitionStepObjectTypeLinkedinMessage SequenceActivateResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceActivateResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObject2DeliveryModeAuto SequenceActivateResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObject2DeliveryModeForReview SequenceActivateResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObject2ModeAgent SequenceActivateResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceActivateResponseDefinitionStepObject2TypeLinkedinInvite SequenceActivateResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceActivateResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObject3DeliveryModeAuto SequenceActivateResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObject3DeliveryModeForReview SequenceActivateResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObject3ModeTemplate SequenceActivateResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceActivateResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceActivateResponseDefinitionStepObject3TypeEmail SequenceActivateResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceActivateResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObject4DeliveryModeAuto SequenceActivateResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObject4DeliveryModeForReview SequenceActivateResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObject4ModeTemplate SequenceActivateResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceActivateResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceActivateResponseDefinitionStepObject4TypeLinkedinMessage SequenceActivateResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceActivateResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceActivateResponseDefinitionStepObject5DeliveryModeAuto SequenceActivateResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceActivateResponseDefinitionStepObject5DeliveryModeForReview SequenceActivateResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceActivateResponseDefinitionStepObject5ModeTemplate SequenceActivateResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceActivateResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceActivateResponseDefinitionStepObject5TypeLinkedinInvite SequenceActivateResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceActivateResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceActivateResponseDefinitionStepObject6TypeWait SequenceActivateResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceActivateResponseDefinitionStepObject6TypeWaitForConnection SequenceActivateResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceActivateResponseDefinitionStepObject6UnitDay SequenceActivateResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceActivateResponseDefinitionStepObject6UnitMinute SequenceActivateResponseDefinitionStepObject6Unit = "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 SequenceActivateResponseObjectType`

    Always `sequence`.

    - `const SequenceActivateResponseObjectTypeSequence SequenceActivateResponseObjectType = "sequence"`

  - `Reviewers []SequenceActivateResponseReviewer`

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

      Always `member`.

      - `const SequenceActivateResponseReviewerObjectTypeMember SequenceActivateResponseReviewerObjectType = "member"`

  - `Senders []SequenceActivateResponseSender`

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

      Always `sender`.

      - `const SequenceActivateResponseSenderObjectTypeSender SequenceActivateResponseSenderObjectType = "sender"`

  - `Status SequenceActivateResponseStatus`

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

    - `const SequenceActivateResponseStatusDraft SequenceActivateResponseStatus = "DRAFT"`

    - `const SequenceActivateResponseStatusActive SequenceActivateResponseStatus = "ACTIVE"`

    - `const SequenceActivateResponseStatusDeactivated SequenceActivateResponseStatus = "DEACTIVATED"`

### Sequence Create Response

- `type SequenceCreateResponse struct{…}`

  - `Channels []string`

    Channels the draft's steps send on.

    - `const SequenceCreateResponseChannelEmail SequenceCreateResponseChannel = "EMAIL"`

    - `const SequenceCreateResponseChannelLinkedin SequenceCreateResponseChannel = "LINKEDIN"`

  - `Definition SequenceCreateResponseDefinition`

    The draft configuration, in the same shape as a published definition.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceCreateResponseDefinitionMessaging`

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

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

      - `Email SequenceCreateResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceCreateResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceCreateResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceCreateResponseDefinitionPriorityHigh SequenceCreateResponseDefinitionPriority = "HIGH"`

      - `const SequenceCreateResponseDefinitionPriorityNormal SequenceCreateResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceCreateResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceCreateResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceCreateResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObjectDeliveryModeAuto SequenceCreateResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObjectDeliveryModeForReview SequenceCreateResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObjectModeAgent SequenceCreateResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObjectTypeEmail SequenceCreateResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceCreateResponseDefinitionStepObjectTypeLinkedinMessage SequenceCreateResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceCreateResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObject2DeliveryModeAuto SequenceCreateResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject2DeliveryModeForReview SequenceCreateResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObject2ModeAgent SequenceCreateResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject2TypeLinkedinInvite SequenceCreateResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceCreateResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObject3DeliveryModeAuto SequenceCreateResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject3DeliveryModeForReview SequenceCreateResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObject3ModeTemplate SequenceCreateResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject3TypeEmail SequenceCreateResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceCreateResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObject4DeliveryModeAuto SequenceCreateResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject4DeliveryModeForReview SequenceCreateResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObject4ModeTemplate SequenceCreateResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject4TypeLinkedinMessage SequenceCreateResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceCreateResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceCreateResponseDefinitionStepObject5DeliveryModeAuto SequenceCreateResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceCreateResponseDefinitionStepObject5DeliveryModeForReview SequenceCreateResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceCreateResponseDefinitionStepObject5ModeTemplate SequenceCreateResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceCreateResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceCreateResponseDefinitionStepObject5TypeLinkedinInvite SequenceCreateResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceCreateResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceCreateResponseDefinitionStepObject6TypeWait SequenceCreateResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceCreateResponseDefinitionStepObject6TypeWaitForConnection SequenceCreateResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceCreateResponseDefinitionStepObject6UnitDay SequenceCreateResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceCreateResponseDefinitionStepObject6UnitMinute SequenceCreateResponseDefinitionStepObject6Unit = "MINUTE"`

  - `Name string`

    Name the sequence takes when the draft is published.

  - `PublishWarnings []SequenceCreateResponsePublishWarning`

    What publishing this draft would change for contacts already in the sequence; empty when nothing is affected. Before the first publish, the only possible warning is a proposed sender that was archived and would be left off.

    - `Code string`

      What publishing would change.

      - `const SequenceCreateResponsePublishWarningCodeDelayShortened SequenceCreateResponsePublishWarningCode = "delay_shortened"`

      - `const SequenceCreateResponsePublishWarningCodeDelayLengthened SequenceCreateResponsePublishWarningCode = "delay_lengthened"`

      - `const SequenceCreateResponsePublishWarningCodeConnectionWaitShortened SequenceCreateResponsePublishWarningCode = "connection_wait_shortened"`

      - `const SequenceCreateResponsePublishWarningCodeConnectionWaitLengthened SequenceCreateResponsePublishWarningCode = "connection_wait_lengthened"`

      - `const SequenceCreateResponsePublishWarningCodeSendScheduleChanged SequenceCreateResponsePublishWarningCode = "send_schedule_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendConfigurationChanged SequenceCreateResponsePublishWarningCode = "send_configuration_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendPriorityChanged SequenceCreateResponsePublishWarningCode = "send_priority_changed"`

      - `const SequenceCreateResponsePublishWarningCodeSendersChanged SequenceCreateResponsePublishWarningCode = "senders_changed"`

      - `const SequenceCreateResponsePublishWarningCodeEmailSenderPoolEmptied SequenceCreateResponsePublishWarningCode = "email_sender_pool_emptied"`

      - `const SequenceCreateResponsePublishWarningCodeLinkedinAccountPoolEmptied SequenceCreateResponsePublishWarningCode = "linkedin_account_pool_emptied"`

      - `const SequenceCreateResponsePublishWarningCodeAssignedSenderRemoved SequenceCreateResponsePublishWarningCode = "assigned_sender_removed"`

      - `const SequenceCreateResponsePublishWarningCodeDeliveryBecameAutomatic SequenceCreateResponsePublishWarningCode = "delivery_became_automatic"`

      - `const SequenceCreateResponsePublishWarningCodeInviteNoteEnabled SequenceCreateResponsePublishWarningCode = "invite_note_enabled"`

      - `const SequenceCreateResponsePublishWarningCodeInviteNoteDisabled SequenceCreateResponsePublishWarningCode = "invite_note_disabled"`

      - `const SequenceCreateResponsePublishWarningCodeStepInserted SequenceCreateResponsePublishWarningCode = "step_inserted"`

      - `const SequenceCreateResponsePublishWarningCodeAutomaticSendStepInserted SequenceCreateResponsePublishWarningCode = "automatic_send_step_inserted"`

      - `const SequenceCreateResponsePublishWarningCodeStepRemoved SequenceCreateResponsePublishWarningCode = "step_removed"`

      - `const SequenceCreateResponsePublishWarningCodeStepTypeChanged SequenceCreateResponsePublishWarningCode = "step_type_changed"`

      - `const SequenceCreateResponsePublishWarningCodeStepOrderChanged SequenceCreateResponsePublishWarningCode = "step_order_changed"`

      - `const SequenceCreateResponsePublishWarningCodeFullIdentityRewrite SequenceCreateResponsePublishWarningCode = "full_identity_rewrite"`

      - `const SequenceCreateResponsePublishWarningCodeLowIdentityOverlap SequenceCreateResponsePublishWarningCode = "low_identity_overlap"`

    - `Message string`

      What would change, in plain language.

    - `Severity string`

      `destructive` when contacts already in the sequence may skip, repeat or receive a step they would not have; `warning` otherwise.

      - `const SequenceCreateResponsePublishWarningSeverityWarning SequenceCreateResponsePublishWarningSeverity = "warning"`

      - `const SequenceCreateResponsePublishWarningSeverityDestructive SequenceCreateResponsePublishWarningSeverity = "destructive"`

    - `StepIDs []string`

      The steps involved; empty for a sequence-wide change.

  - `Reviewers []SequenceCreateResponseReviewer`

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

      Always `member`.

      - `const SequenceCreateResponseReviewerObjectTypeMember SequenceCreateResponseReviewerObjectType = "member"`

  - `Senders []SequenceCreateResponseSender`

    The senders this draft will publish; new contacts rotate across them. Until a save changes it, this is the sequence’s live list. An archived sender stays listed but never sends; any change to the list drops it.

    - `ID string`

      ID of the sender.

    - `ObjectType string`

      Always `sender`.

      - `const SequenceCreateResponseSenderObjectTypeSender SequenceCreateResponseSenderObjectType = "sender"`

  - `SequenceID string`

    The sequence this draft belongs to.

  - `UpdatedAt string`

    When the draft last changed.

  - `Version string`

    Opaque token for the current state of the draft. Send it as `expectedVersion` on the next save, publish or discard; it changes whenever anyone edits the draft.

### Sequence Deactivate Response

- `type SequenceDeactivateResponse struct{…}`

  - `ID string`

    Unique identifier of the sequence.

  - `Channels []string`

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

    - `const SequenceDeactivateResponseChannelEmail SequenceDeactivateResponseChannel = "EMAIL"`

    - `const SequenceDeactivateResponseChannelLinkedin SequenceDeactivateResponseChannel = "LINKEDIN"`

  - `CreatedAt string`

    ISO 8601 creation timestamp.

  - `Definition SequenceDeactivateResponseDefinition`

    Published configuration, or null before the first publish.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceDeactivateResponseDefinitionMessaging`

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

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

      - `Email SequenceDeactivateResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceDeactivateResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceDeactivateResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceDeactivateResponseDefinitionPriorityHigh SequenceDeactivateResponseDefinitionPriority = "HIGH"`

      - `const SequenceDeactivateResponseDefinitionPriorityNormal SequenceDeactivateResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceDeactivateResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceDeactivateResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceDeactivateResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObjectDeliveryModeAuto SequenceDeactivateResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObjectDeliveryModeForReview SequenceDeactivateResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObjectModeAgent SequenceDeactivateResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObjectTypeEmail SequenceDeactivateResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceDeactivateResponseDefinitionStepObjectTypeLinkedinMessage SequenceDeactivateResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceDeactivateResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject2DeliveryModeAuto SequenceDeactivateResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObject2DeliveryModeForReview SequenceDeactivateResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject2ModeAgent SequenceDeactivateResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObject2TypeLinkedinInvite SequenceDeactivateResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceDeactivateResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject3DeliveryModeAuto SequenceDeactivateResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObject3DeliveryModeForReview SequenceDeactivateResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject3ModeTemplate SequenceDeactivateResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceDeactivateResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObject3TypeEmail SequenceDeactivateResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceDeactivateResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject4DeliveryModeAuto SequenceDeactivateResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObject4DeliveryModeForReview SequenceDeactivateResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject4ModeTemplate SequenceDeactivateResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceDeactivateResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObject4TypeLinkedinMessage SequenceDeactivateResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceDeactivateResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject5DeliveryModeAuto SequenceDeactivateResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceDeactivateResponseDefinitionStepObject5DeliveryModeForReview SequenceDeactivateResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject5ModeTemplate SequenceDeactivateResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceDeactivateResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceDeactivateResponseDefinitionStepObject5TypeLinkedinInvite SequenceDeactivateResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceDeactivateResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceDeactivateResponseDefinitionStepObject6TypeWait SequenceDeactivateResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceDeactivateResponseDefinitionStepObject6TypeWaitForConnection SequenceDeactivateResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceDeactivateResponseDefinitionStepObject6UnitDay SequenceDeactivateResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceDeactivateResponseDefinitionStepObject6UnitMinute SequenceDeactivateResponseDefinitionStepObject6Unit = "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 SequenceDeactivateResponseObjectType`

    Always `sequence`.

    - `const SequenceDeactivateResponseObjectTypeSequence SequenceDeactivateResponseObjectType = "sequence"`

  - `Reviewers []SequenceDeactivateResponseReviewer`

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

      Always `member`.

      - `const SequenceDeactivateResponseReviewerObjectTypeMember SequenceDeactivateResponseReviewerObjectType = "member"`

  - `Senders []SequenceDeactivateResponseSender`

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

      Always `sender`.

      - `const SequenceDeactivateResponseSenderObjectTypeSender SequenceDeactivateResponseSenderObjectType = "sender"`

  - `Status SequenceDeactivateResponseStatus`

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

    - `const SequenceDeactivateResponseStatusDraft SequenceDeactivateResponseStatus = "DRAFT"`

    - `const SequenceDeactivateResponseStatusActive SequenceDeactivateResponseStatus = "ACTIVE"`

    - `const SequenceDeactivateResponseStatusDeactivated SequenceDeactivateResponseStatus = "DEACTIVATED"`

### Sequence Discard Draft Response

- `type SequenceDiscardDraftResponse struct{…}`

  - `SequenceDeleted bool`

    True when the sequence had never been published, so discarding its only draft deleted it.

  - `SequenceID string`

    The sequence whose draft was discarded.

### Sequence List Enrollments Response

- `type SequenceListEnrollmentsResponse struct{…}`

  - `Data []SequenceListEnrollmentsResponseData`

    - `ID string`

      Unique identifier of the enrollment.

    - `CancelledAt string`

      When the enrollment was cancelled, or null if it was not.

    - `CompletedAt string`

      When the enrollment completed, or null if it has not.

    - `ContactID string`

      ID of the enrolled contact.

    - `CurrentStepID string`

      ID of the step the contact is on, matching `definition.steps`; null when the contact has no current step the API returns.

    - `EnrolledAt string`

      When the contact was enrolled.

    - `EnrolledBy string`

      Member ID of whoever enrolled the contact; null when they are no longer a member or the enrollment was automatic.

    - `LastActivityAt string`

      When `lastActivityKind` happened; null when there has been no activity.

    - `LastActivityKind string`

      The latest activity on the enrollment. A reply or bounce that ended the enrollment is reported over a later open.

      - `const SequenceListEnrollmentsResponseDataLastActivityKindSent SequenceListEnrollmentsResponseDataLastActivityKind = "SENT"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindOpened SequenceListEnrollmentsResponseDataLastActivityKind = "OPENED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindReplied SequenceListEnrollmentsResponseDataLastActivityKind = "REPLIED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindBounced SequenceListEnrollmentsResponseDataLastActivityKind = "BOUNCED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindInvited SequenceListEnrollmentsResponseDataLastActivityKind = "INVITED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindConnected SequenceListEnrollmentsResponseDataLastActivityKind = "CONNECTED"`

      - `const SequenceListEnrollmentsResponseDataLastActivityKindSeen SequenceListEnrollmentsResponseDataLastActivityKind = "SEEN"`

    - `NextSendAt string`

      Estimated time of the next send, from the cadence, send window, pacing and sender; queue order and random gaps can push it later. Null while a message awaits review or is sending, while paused, or when it cannot be estimated.

    - `RemainingSends int64`

      Email and LinkedIn steps not yet sent, connection requests included.

    - `RepliedAt string`

      When the contact first replied, on email or LinkedIn; null if they have not.

    - `Status string`

      `ACTIVE` is progressing; `AWAITING_REVIEW` has a message waiting for approval; `NEEDS_ATTENTION` is held by a failed step, a held draft or an unavailable sender; `PAUSED` is stopped because the sequence is deactivated or it was paused in Lightfield. `REPLIED`, `COMPLETED`, `CANCELLED` and `FAILED` are final.

      - `const SequenceListEnrollmentsResponseDataStatusActive SequenceListEnrollmentsResponseDataStatus = "ACTIVE"`

      - `const SequenceListEnrollmentsResponseDataStatusAwaitingReview SequenceListEnrollmentsResponseDataStatus = "AWAITING_REVIEW"`

      - `const SequenceListEnrollmentsResponseDataStatusNeedsAttention SequenceListEnrollmentsResponseDataStatus = "NEEDS_ATTENTION"`

      - `const SequenceListEnrollmentsResponseDataStatusReplied SequenceListEnrollmentsResponseDataStatus = "REPLIED"`

      - `const SequenceListEnrollmentsResponseDataStatusCompleted SequenceListEnrollmentsResponseDataStatus = "COMPLETED"`

      - `const SequenceListEnrollmentsResponseDataStatusPaused SequenceListEnrollmentsResponseDataStatus = "PAUSED"`

      - `const SequenceListEnrollmentsResponseDataStatusCancelled SequenceListEnrollmentsResponseDataStatus = "CANCELLED"`

      - `const SequenceListEnrollmentsResponseDataStatusFailed SequenceListEnrollmentsResponseDataStatus = "FAILED"`

  - `Object SequenceListEnrollmentsResponseObject`

    - `const SequenceListEnrollmentsResponseObjectList SequenceListEnrollmentsResponseObject = "list"`

  - `TotalCount int64`

### Sequence List Messages Response

- `type SequenceListMessagesResponse struct{…}`

  - `Data []SequenceListMessagesResponseDataUnion`

    - `type SequenceListMessagesResponseDataOutboundMessage struct{…}`

      - `ID string`

        Unique identifier of the message.

      - `AcceptedAt string`

        When the connection request was accepted; null until then.

      - `BouncedAt string`

        When the email bounced; null until then.

      - `Channel string`

        Channel the message went over.

        - `const SequenceListMessagesResponseDataOutboundMessageChannelEmail SequenceListMessagesResponseDataOutboundMessageChannel = "EMAIL"`

        - `const SequenceListMessagesResponseDataOutboundMessageChannelLinkedin SequenceListMessagesResponseDataOutboundMessageChannel = "LINKEDIN"`

      - `ContactID string`

        ID of the contact.

      - `CreatedAt string`

        When the message was created, or when a reply was received. Lists sort by this field, newest first.

      - `Direction string`

        Always `OUTBOUND`.

        - `const SequenceListMessagesResponseDataOutboundMessageDirectionOutbound SequenceListMessagesResponseDataOutboundMessageDirection = "OUTBOUND"`

      - `EnrollmentID string`

        ID of the enrollment the message belongs to.

      - `OpenedAt string`

        When the email was opened; null until then.

      - `ReadAt string`

        When the LinkedIn message was read; null until then.

      - `Reference SequenceListMessagesResponseDataOutboundMessageReferenceUnion`

        The email or LinkedIn message record behind this sequence message, readable with <u>[Retrieve an email](/api/resources/email/methods/retrieve)</u> or <u>[Retrieve a message](/api/resources/message/methods/retrieve)</u> under their own scopes; null when there is none.

        - `type SequenceListMessagesResponseDataOutboundMessageReferenceEmail struct{…}`

          - `ID string`

            ID of the email.

          - `ObjectType string`

            Always `email`.

            - `const SequenceListMessagesResponseDataOutboundMessageReferenceEmailObjectTypeEmail SequenceListMessagesResponseDataOutboundMessageReferenceEmailObjectType = "email"`

        - `type SequenceListMessagesResponseDataOutboundMessageReferenceMessage struct{…}`

          - `ID string`

            ID of the message.

          - `ObjectType string`

            Always `message`.

            - `const SequenceListMessagesResponseDataOutboundMessageReferenceMessageObjectTypeMessage SequenceListMessagesResponseDataOutboundMessageReferenceMessageObjectType = "message"`

      - `RepliedAt string`

        When the contact replied to this message; null until then.

      - `SentAt string`

        When the message was sent; null until then.

      - `SequenceStepID string`

        ID of the step that sent the message or, for a reply, the step it replied to.

      - `SequenceStepType string`

        Type of that step.

        - `const SequenceListMessagesResponseDataOutboundMessageSequenceStepTypeEmail SequenceListMessagesResponseDataOutboundMessageSequenceStepType = "EMAIL"`

        - `const SequenceListMessagesResponseDataOutboundMessageSequenceStepTypeLinkedinMessage SequenceListMessagesResponseDataOutboundMessageSequenceStepType = "LINKEDIN_MESSAGE"`

        - `const SequenceListMessagesResponseDataOutboundMessageSequenceStepTypeLinkedinInvite SequenceListMessagesResponseDataOutboundMessageSequenceStepType = "LINKEDIN_INVITE"`

      - `Status string`

        `AWAITING_REVIEW` is waiting for approval; `SCHEDULED` is composed and waiting for its send time; `QUEUED` is due and waiting on the sender. `SENT`, `SKIPPED`, `FAILED` and `CANCELLED` are final.

        - `const SequenceListMessagesResponseDataOutboundMessageStatusAwaitingReview SequenceListMessagesResponseDataOutboundMessageStatus = "AWAITING_REVIEW"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusScheduled SequenceListMessagesResponseDataOutboundMessageStatus = "SCHEDULED"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusQueued SequenceListMessagesResponseDataOutboundMessageStatus = "QUEUED"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusSent SequenceListMessagesResponseDataOutboundMessageStatus = "SENT"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusSkipped SequenceListMessagesResponseDataOutboundMessageStatus = "SKIPPED"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusFailed SequenceListMessagesResponseDataOutboundMessageStatus = "FAILED"`

        - `const SequenceListMessagesResponseDataOutboundMessageStatusCancelled SequenceListMessagesResponseDataOutboundMessageStatus = "CANCELLED"`

      - `StatusChangedAt string`

        When `status` last changed.

    - `type SequenceListMessagesResponseDataReply struct{…}`

      - `ID string`

        Unique identifier of the message.

      - `Channel string`

        Channel the message went over.

        - `const SequenceListMessagesResponseDataReplyChannelEmail SequenceListMessagesResponseDataReplyChannel = "EMAIL"`

        - `const SequenceListMessagesResponseDataReplyChannelLinkedin SequenceListMessagesResponseDataReplyChannel = "LINKEDIN"`

      - `ContactID string`

        ID of the contact.

      - `CreatedAt string`

        When the message was created, or when a reply was received. Lists sort by this field, newest first.

      - `Direction string`

        Always `INBOUND`.

        - `const SequenceListMessagesResponseDataReplyDirectionInbound SequenceListMessagesResponseDataReplyDirection = "INBOUND"`

      - `EnrollmentID string`

        ID of the enrollment the message belongs to.

      - `ReceivedAt string`

        When the reply was received.

      - `Reference SequenceListMessagesResponseDataReplyReferenceUnion`

        The email or LinkedIn message record behind this sequence message, readable with <u>[Retrieve an email](/api/resources/email/methods/retrieve)</u> or <u>[Retrieve a message](/api/resources/message/methods/retrieve)</u> under their own scopes; null when there is none.

        - `type SequenceListMessagesResponseDataReplyReferenceEmail struct{…}`

          - `ID string`

            ID of the email.

          - `ObjectType string`

            Always `email`.

            - `const SequenceListMessagesResponseDataReplyReferenceEmailObjectTypeEmail SequenceListMessagesResponseDataReplyReferenceEmailObjectType = "email"`

        - `type SequenceListMessagesResponseDataReplyReferenceMessage struct{…}`

          - `ID string`

            ID of the message.

          - `ObjectType string`

            Always `message`.

            - `const SequenceListMessagesResponseDataReplyReferenceMessageObjectTypeMessage SequenceListMessagesResponseDataReplyReferenceMessageObjectType = "message"`

      - `SequenceStepID string`

        ID of the step that sent the message or, for a reply, the step it replied to.

      - `SequenceStepType string`

        Type of that step.

        - `const SequenceListMessagesResponseDataReplySequenceStepTypeEmail SequenceListMessagesResponseDataReplySequenceStepType = "EMAIL"`

        - `const SequenceListMessagesResponseDataReplySequenceStepTypeLinkedinMessage SequenceListMessagesResponseDataReplySequenceStepType = "LINKEDIN_MESSAGE"`

        - `const SequenceListMessagesResponseDataReplySequenceStepTypeLinkedinInvite SequenceListMessagesResponseDataReplySequenceStepType = "LINKEDIN_INVITE"`

  - `Object SequenceListMessagesResponseObject`

    - `const SequenceListMessagesResponseObjectList SequenceListMessagesResponseObject = "list"`

  - `TotalCount int64`

### Sequence List Response

- `type SequenceListResponse struct{…}`

  - `Data []SequenceListResponseData`

    - `ID string`

      Unique identifier of the sequence.

    - `Channels []string`

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

      - `const SequenceListResponseDataChannelEmail SequenceListResponseDataChannel = "EMAIL"`

      - `const SequenceListResponseDataChannelLinkedin SequenceListResponseDataChannel = "LINKEDIN"`

    - `CreatedAt string`

      ISO 8601 creation timestamp.

    - `Definition SequenceListResponseDataDefinition`

      Published configuration, or null before the first publish.

      - `Description string`

        What this version of the sequence is for.

      - `Messaging SequenceListResponseDataDefinitionMessaging`

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

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

        - `Email SequenceListResponseDataDefinitionPacingEmail`

          Email steps.

          - `DailyLimit int64`

            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.

        - `LinkedinInvite SequenceListResponseDataDefinitionPacingLinkedinInvite`

          LinkedIn connection requests.

          - `DailyLimit int64`

            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.

        - `LinkedinMessage SequenceListResponseDataDefinitionPacingLinkedinMessage`

          LinkedIn messages.

          - `DailyLimit int64`

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

        Send priority relative to other sequences.

        - `const SequenceListResponseDataDefinitionPriorityHigh SequenceListResponseDataDefinitionPriority = "HIGH"`

        - `const SequenceListResponseDataDefinitionPriorityNormal SequenceListResponseDataDefinitionPriority = "NORMAL"`

      - `SendWindow SequenceListResponseDataDefinitionSendWindow`

        When the sequence may send.

        - `DaysOfWeek []int64`

          Days sends may go out, 0 = Sunday.

        - `EndHour int64`

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

        - `StartHour int64`

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

        - `Timezone string`

          IANA timezone of the window.

      - `Steps []SequenceListResponseDataDefinitionStepUnion`

        Email, LinkedIn and wait steps in execution order.

        - `type SequenceListResponseDataDefinitionStepObject struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObjectDeliveryModeAuto SequenceListResponseDataDefinitionStepObjectDeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObjectDeliveryModeForReview SequenceListResponseDataDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObjectModeAgent SequenceListResponseDataDefinitionStepObjectMode = "AGENT"`

          - `Name string`

            Display name of the step.

          - `Prompt string`

            Instructions the agent follows when composing this message.

          - `Type string`

            Step type.

            - `const SequenceListResponseDataDefinitionStepObjectTypeEmail SequenceListResponseDataDefinitionStepObjectType = "EMAIL"`

            - `const SequenceListResponseDataDefinitionStepObjectTypeLinkedinMessage SequenceListResponseDataDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

        - `type SequenceListResponseDataDefinitionStepObject2 struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObject2DeliveryModeAuto SequenceListResponseDataDefinitionStepObject2DeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObject2DeliveryModeForReview SequenceListResponseDataDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

          - `IncludeNote bool`

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

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObject2ModeAgent SequenceListResponseDataDefinitionStepObject2Mode = "AGENT"`

          - `Name string`

            Display name of the step.

          - `Prompt string`

            Instructions the agent follows when composing this message.

          - `Type string`

            Step type.

            - `const SequenceListResponseDataDefinitionStepObject2TypeLinkedinInvite SequenceListResponseDataDefinitionStepObject2Type = "LINKEDIN_INVITE"`

        - `type SequenceListResponseDataDefinitionStepObject3 struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObject3DeliveryModeAuto SequenceListResponseDataDefinitionStepObject3DeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObject3DeliveryModeForReview SequenceListResponseDataDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObject3ModeTemplate SequenceListResponseDataDefinitionStepObject3Mode = "TEMPLATE"`

          - `Name string`

            Display name of the step.

          - `Template SequenceListResponseDataDefinitionStepObject3Template`

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

            Step type.

            - `const SequenceListResponseDataDefinitionStepObject3TypeEmail SequenceListResponseDataDefinitionStepObject3Type = "EMAIL"`

        - `type SequenceListResponseDataDefinitionStepObject4 struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObject4DeliveryModeAuto SequenceListResponseDataDefinitionStepObject4DeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObject4DeliveryModeForReview SequenceListResponseDataDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObject4ModeTemplate SequenceListResponseDataDefinitionStepObject4Mode = "TEMPLATE"`

          - `Name string`

            Display name of the step.

          - `Template SequenceListResponseDataDefinitionStepObject4Template`

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

            Step type.

            - `const SequenceListResponseDataDefinitionStepObject4TypeLinkedinMessage SequenceListResponseDataDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

        - `type SequenceListResponseDataDefinitionStepObject5 struct{…}`

          - `ID string`

            Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

          - `DeliveryMode string`

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

            - `const SequenceListResponseDataDefinitionStepObject5DeliveryModeAuto SequenceListResponseDataDefinitionStepObject5DeliveryMode = "AUTO"`

            - `const SequenceListResponseDataDefinitionStepObject5DeliveryModeForReview SequenceListResponseDataDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

          - `IncludeNote bool`

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

          - `Mode string`

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

            - `const SequenceListResponseDataDefinitionStepObject5ModeTemplate SequenceListResponseDataDefinitionStepObject5Mode = "TEMPLATE"`

          - `Name string`

            Display name of the step.

          - `Template SequenceListResponseDataDefinitionStepObject5Template`

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

            Step type.

            - `const SequenceListResponseDataDefinitionStepObject5TypeLinkedinInvite SequenceListResponseDataDefinitionStepObject5Type = "LINKEDIN_INVITE"`

        - `type SequenceListResponseDataDefinitionStepObject6 struct{…}`

          - `ID string`

            Step identifier.

          - `Duration int64`

            Length of the wait.

          - `Type string`

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

            - `const SequenceListResponseDataDefinitionStepObject6TypeWait SequenceListResponseDataDefinitionStepObject6Type = "WAIT"`

            - `const SequenceListResponseDataDefinitionStepObject6TypeWaitForConnection SequenceListResponseDataDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

          - `Unit string`

            Unit of `duration`.

            - `const SequenceListResponseDataDefinitionStepObject6UnitDay SequenceListResponseDataDefinitionStepObject6Unit = "DAY"`

            - `const SequenceListResponseDataDefinitionStepObject6UnitMinute SequenceListResponseDataDefinitionStepObject6Unit = "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 string`

      Always `sequence`.

      - `const SequenceListResponseDataObjectTypeSequence SequenceListResponseDataObjectType = "sequence"`

    - `Reviewers []SequenceListResponseDataReviewer`

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

        Always `member`.

        - `const SequenceListResponseDataReviewerObjectTypeMember SequenceListResponseDataReviewerObjectType = "member"`

    - `Senders []SequenceListResponseDataSender`

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

        Always `sender`.

        - `const SequenceListResponseDataSenderObjectTypeSender SequenceListResponseDataSenderObjectType = "sender"`

    - `Status string`

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

      - `const SequenceListResponseDataStatusDraft SequenceListResponseDataStatus = "DRAFT"`

      - `const SequenceListResponseDataStatusActive SequenceListResponseDataStatus = "ACTIVE"`

      - `const SequenceListResponseDataStatusDeactivated SequenceListResponseDataStatus = "DEACTIVATED"`

  - `Object SequenceListResponseObject`

    - `const SequenceListResponseObjectList SequenceListResponseObject = "list"`

  - `TotalCount int64`

### Sequence List Template Variables Response

- `type SequenceListTemplateVariablesResponse struct{…}`

  - `Data []SequenceListTemplateVariablesResponseData`

    - `Field SequenceListTemplateVariablesResponseDataField`

      The field the variable reads; null for built-in variables.

      - `ID string`

        The `ad_` id of the field, as the field-definitions endpoints list it.

      - `ValueType string`

        Type of the field.

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeAddress SequenceListTemplateVariablesResponseDataFieldValueType = "ADDRESS"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeCheckbox SequenceListTemplateVariablesResponseDataFieldValueType = "CHECKBOX"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeCurrency SequenceListTemplateVariablesResponseDataFieldValueType = "CURRENCY"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeDatetime SequenceListTemplateVariablesResponseDataFieldValueType = "DATETIME"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeEmail SequenceListTemplateVariablesResponseDataFieldValueType = "EMAIL"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeFullName SequenceListTemplateVariablesResponseDataFieldValueType = "FULL_NAME"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeMarkdown SequenceListTemplateVariablesResponseDataFieldValueType = "MARKDOWN"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeMultiSelect SequenceListTemplateVariablesResponseDataFieldValueType = "MULTI_SELECT"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeNumber SequenceListTemplateVariablesResponseDataFieldValueType = "NUMBER"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeSingleSelect SequenceListTemplateVariablesResponseDataFieldValueType = "SINGLE_SELECT"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeSocialHandle SequenceListTemplateVariablesResponseDataFieldValueType = "SOCIAL_HANDLE"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeTelephone SequenceListTemplateVariablesResponseDataFieldValueType = "TELEPHONE"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeText SequenceListTemplateVariablesResponseDataFieldValueType = "TEXT"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeURL SequenceListTemplateVariablesResponseDataFieldValueType = "URL"`

        - `const SequenceListTemplateVariablesResponseDataFieldValueTypeHTML SequenceListTemplateVariablesResponseDataFieldValueType = "HTML"`

    - `Group string`

      Whose value the variable prints: the enrolled contact, its first account, or the step’s sender.

      - `const SequenceListTemplateVariablesResponseDataGroupContact SequenceListTemplateVariablesResponseDataGroup = "contact"`

      - `const SequenceListTemplateVariablesResponseDataGroupAccount SequenceListTemplateVariablesResponseDataGroup = "account"`

      - `const SequenceListTemplateVariablesResponseDataGroupSender SequenceListTemplateVariablesResponseDataGroup = "sender"`

    - `Label string`

      Name of the variable, as the editor shows it.

    - `Ref string`

      The variable, e.g. `{{ {attr:ad_…} }}`. A variable needs a fallback for contacts missing the value: `{{ {attr:ad_…} }}` is written `{{ coalesce({attr:ad_…}, "fallback") }}`, and one without a fallback is refused when the draft is saved.

  - `Object SequenceListTemplateVariablesResponseObject`

    - `const SequenceListTemplateVariablesResponseObjectList SequenceListTemplateVariablesResponseObject = "list"`

  - `TotalCount int64`

### Sequence Publish Draft Response

- `type SequencePublishDraftResponse struct{…}`

  - `ID string`

    Unique identifier of the sequence.

  - `Channels []string`

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

    - `const SequencePublishDraftResponseChannelEmail SequencePublishDraftResponseChannel = "EMAIL"`

    - `const SequencePublishDraftResponseChannelLinkedin SequencePublishDraftResponseChannel = "LINKEDIN"`

  - `CreatedAt string`

    ISO 8601 creation timestamp.

  - `Definition SequencePublishDraftResponseDefinition`

    Published configuration, or null before the first publish.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequencePublishDraftResponseDefinitionMessaging`

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

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

      - `Email SequencePublishDraftResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequencePublishDraftResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequencePublishDraftResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequencePublishDraftResponseDefinitionPriorityHigh SequencePublishDraftResponseDefinitionPriority = "HIGH"`

      - `const SequencePublishDraftResponseDefinitionPriorityNormal SequencePublishDraftResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequencePublishDraftResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequencePublishDraftResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequencePublishDraftResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObjectDeliveryModeAuto SequencePublishDraftResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObjectDeliveryModeForReview SequencePublishDraftResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObjectModeAgent SequencePublishDraftResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObjectTypeEmail SequencePublishDraftResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequencePublishDraftResponseDefinitionStepObjectTypeLinkedinMessage SequencePublishDraftResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequencePublishDraftResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject2DeliveryModeAuto SequencePublishDraftResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObject2DeliveryModeForReview SequencePublishDraftResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject2ModeAgent SequencePublishDraftResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObject2TypeLinkedinInvite SequencePublishDraftResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequencePublishDraftResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject3DeliveryModeAuto SequencePublishDraftResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObject3DeliveryModeForReview SequencePublishDraftResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject3ModeTemplate SequencePublishDraftResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequencePublishDraftResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObject3TypeEmail SequencePublishDraftResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequencePublishDraftResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject4DeliveryModeAuto SequencePublishDraftResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObject4DeliveryModeForReview SequencePublishDraftResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject4ModeTemplate SequencePublishDraftResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequencePublishDraftResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObject4TypeLinkedinMessage SequencePublishDraftResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequencePublishDraftResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject5DeliveryModeAuto SequencePublishDraftResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequencePublishDraftResponseDefinitionStepObject5DeliveryModeForReview SequencePublishDraftResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject5ModeTemplate SequencePublishDraftResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequencePublishDraftResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequencePublishDraftResponseDefinitionStepObject5TypeLinkedinInvite SequencePublishDraftResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequencePublishDraftResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequencePublishDraftResponseDefinitionStepObject6TypeWait SequencePublishDraftResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequencePublishDraftResponseDefinitionStepObject6TypeWaitForConnection SequencePublishDraftResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequencePublishDraftResponseDefinitionStepObject6UnitDay SequencePublishDraftResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequencePublishDraftResponseDefinitionStepObject6UnitMinute SequencePublishDraftResponseDefinitionStepObject6Unit = "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 SequencePublishDraftResponseObjectType`

    Always `sequence`.

    - `const SequencePublishDraftResponseObjectTypeSequence SequencePublishDraftResponseObjectType = "sequence"`

  - `Reviewers []SequencePublishDraftResponseReviewer`

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

      Always `member`.

      - `const SequencePublishDraftResponseReviewerObjectTypeMember SequencePublishDraftResponseReviewerObjectType = "member"`

  - `Senders []SequencePublishDraftResponseSender`

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

      Always `sender`.

      - `const SequencePublishDraftResponseSenderObjectTypeSender SequencePublishDraftResponseSenderObjectType = "sender"`

  - `Status SequencePublishDraftResponseStatus`

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

    - `const SequencePublishDraftResponseStatusDraft SequencePublishDraftResponseStatus = "DRAFT"`

    - `const SequencePublishDraftResponseStatusActive SequencePublishDraftResponseStatus = "ACTIVE"`

    - `const SequencePublishDraftResponseStatusDeactivated SequencePublishDraftResponseStatus = "DEACTIVATED"`

### Sequence Retrieve Draft Response

- `type SequenceRetrieveDraftResponse struct{…}`

  - `Channels []string`

    Channels the draft's steps send on.

    - `const SequenceRetrieveDraftResponseChannelEmail SequenceRetrieveDraftResponseChannel = "EMAIL"`

    - `const SequenceRetrieveDraftResponseChannelLinkedin SequenceRetrieveDraftResponseChannel = "LINKEDIN"`

  - `Definition SequenceRetrieveDraftResponseDefinition`

    The draft configuration, in the same shape as a published definition.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceRetrieveDraftResponseDefinitionMessaging`

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

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

      - `Email SequenceRetrieveDraftResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceRetrieveDraftResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceRetrieveDraftResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceRetrieveDraftResponseDefinitionPriorityHigh SequenceRetrieveDraftResponseDefinitionPriority = "HIGH"`

      - `const SequenceRetrieveDraftResponseDefinitionPriorityNormal SequenceRetrieveDraftResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceRetrieveDraftResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceRetrieveDraftResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceRetrieveDraftResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectDeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectDeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectModeAgent SequenceRetrieveDraftResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectTypeEmail SequenceRetrieveDraftResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObjectTypeLinkedinMessage SequenceRetrieveDraftResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject2DeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject2DeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject2ModeAgent SequenceRetrieveDraftResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject2TypeLinkedinInvite SequenceRetrieveDraftResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject3DeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject3DeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject3ModeTemplate SequenceRetrieveDraftResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveDraftResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject3TypeEmail SequenceRetrieveDraftResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject4DeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject4DeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject4ModeTemplate SequenceRetrieveDraftResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveDraftResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject4TypeLinkedinMessage SequenceRetrieveDraftResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject5DeliveryModeAuto SequenceRetrieveDraftResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject5DeliveryModeForReview SequenceRetrieveDraftResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject5ModeTemplate SequenceRetrieveDraftResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveDraftResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject5TypeLinkedinInvite SequenceRetrieveDraftResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceRetrieveDraftResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceRetrieveDraftResponseDefinitionStepObject6TypeWait SequenceRetrieveDraftResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject6TypeWaitForConnection SequenceRetrieveDraftResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceRetrieveDraftResponseDefinitionStepObject6UnitDay SequenceRetrieveDraftResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceRetrieveDraftResponseDefinitionStepObject6UnitMinute SequenceRetrieveDraftResponseDefinitionStepObject6Unit = "MINUTE"`

  - `Name string`

    Name the sequence takes when the draft is published.

  - `PublishWarnings []SequenceRetrieveDraftResponsePublishWarning`

    What publishing this draft would change for contacts already in the sequence; empty when nothing is affected. Before the first publish, the only possible warning is a proposed sender that was archived and would be left off.

    - `Code string`

      What publishing would change.

      - `const SequenceRetrieveDraftResponsePublishWarningCodeDelayShortened SequenceRetrieveDraftResponsePublishWarningCode = "delay_shortened"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeDelayLengthened SequenceRetrieveDraftResponsePublishWarningCode = "delay_lengthened"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeConnectionWaitShortened SequenceRetrieveDraftResponsePublishWarningCode = "connection_wait_shortened"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeConnectionWaitLengthened SequenceRetrieveDraftResponsePublishWarningCode = "connection_wait_lengthened"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeSendScheduleChanged SequenceRetrieveDraftResponsePublishWarningCode = "send_schedule_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeSendConfigurationChanged SequenceRetrieveDraftResponsePublishWarningCode = "send_configuration_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeSendPriorityChanged SequenceRetrieveDraftResponsePublishWarningCode = "send_priority_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeSendersChanged SequenceRetrieveDraftResponsePublishWarningCode = "senders_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeEmailSenderPoolEmptied SequenceRetrieveDraftResponsePublishWarningCode = "email_sender_pool_emptied"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeLinkedinAccountPoolEmptied SequenceRetrieveDraftResponsePublishWarningCode = "linkedin_account_pool_emptied"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeAssignedSenderRemoved SequenceRetrieveDraftResponsePublishWarningCode = "assigned_sender_removed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeDeliveryBecameAutomatic SequenceRetrieveDraftResponsePublishWarningCode = "delivery_became_automatic"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeInviteNoteEnabled SequenceRetrieveDraftResponsePublishWarningCode = "invite_note_enabled"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeInviteNoteDisabled SequenceRetrieveDraftResponsePublishWarningCode = "invite_note_disabled"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeStepInserted SequenceRetrieveDraftResponsePublishWarningCode = "step_inserted"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeAutomaticSendStepInserted SequenceRetrieveDraftResponsePublishWarningCode = "automatic_send_step_inserted"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeStepRemoved SequenceRetrieveDraftResponsePublishWarningCode = "step_removed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeStepTypeChanged SequenceRetrieveDraftResponsePublishWarningCode = "step_type_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeStepOrderChanged SequenceRetrieveDraftResponsePublishWarningCode = "step_order_changed"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeFullIdentityRewrite SequenceRetrieveDraftResponsePublishWarningCode = "full_identity_rewrite"`

      - `const SequenceRetrieveDraftResponsePublishWarningCodeLowIdentityOverlap SequenceRetrieveDraftResponsePublishWarningCode = "low_identity_overlap"`

    - `Message string`

      What would change, in plain language.

    - `Severity string`

      `destructive` when contacts already in the sequence may skip, repeat or receive a step they would not have; `warning` otherwise.

      - `const SequenceRetrieveDraftResponsePublishWarningSeverityWarning SequenceRetrieveDraftResponsePublishWarningSeverity = "warning"`

      - `const SequenceRetrieveDraftResponsePublishWarningSeverityDestructive SequenceRetrieveDraftResponsePublishWarningSeverity = "destructive"`

    - `StepIDs []string`

      The steps involved; empty for a sequence-wide change.

  - `Reviewers []SequenceRetrieveDraftResponseReviewer`

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

      Always `member`.

      - `const SequenceRetrieveDraftResponseReviewerObjectTypeMember SequenceRetrieveDraftResponseReviewerObjectType = "member"`

  - `Senders []SequenceRetrieveDraftResponseSender`

    The senders this draft will publish; new contacts rotate across them. Until a save changes it, this is the sequence’s live list. An archived sender stays listed but never sends; any change to the list drops it.

    - `ID string`

      ID of the sender.

    - `ObjectType string`

      Always `sender`.

      - `const SequenceRetrieveDraftResponseSenderObjectTypeSender SequenceRetrieveDraftResponseSenderObjectType = "sender"`

  - `SequenceID string`

    The sequence this draft belongs to.

  - `UpdatedAt string`

    When the draft last changed.

  - `Version string`

    Opaque token for the current state of the draft. Send it as `expectedVersion` on the next save, publish or discard; it changes whenever anyone edits the draft.

### Sequence Retrieve Enrollment Response

- `type SequenceRetrieveEnrollmentResponse struct{…}`

  - `ID string`

    Unique identifier of the enrollment.

  - `CancelledAt string`

    When the enrollment was cancelled, or null if it was not.

  - `CompletedAt string`

    When the enrollment completed, or null if it has not.

  - `ContactID string`

    ID of the enrolled contact.

  - `CurrentStepID string`

    ID of the step the contact is on, matching `definition.steps`; null when the contact has no current step the API returns.

  - `EnrolledAt string`

    When the contact was enrolled.

  - `EnrolledBy string`

    Member ID of whoever enrolled the contact; null when they are no longer a member or the enrollment was automatic.

  - `LastActivityAt string`

    When `lastActivityKind` happened; null when there has been no activity.

  - `LastActivityKind SequenceRetrieveEnrollmentResponseLastActivityKind`

    The latest activity on the enrollment. A reply or bounce that ended the enrollment is reported over a later open.

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindSent SequenceRetrieveEnrollmentResponseLastActivityKind = "SENT"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindOpened SequenceRetrieveEnrollmentResponseLastActivityKind = "OPENED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindReplied SequenceRetrieveEnrollmentResponseLastActivityKind = "REPLIED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindBounced SequenceRetrieveEnrollmentResponseLastActivityKind = "BOUNCED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindInvited SequenceRetrieveEnrollmentResponseLastActivityKind = "INVITED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindConnected SequenceRetrieveEnrollmentResponseLastActivityKind = "CONNECTED"`

    - `const SequenceRetrieveEnrollmentResponseLastActivityKindSeen SequenceRetrieveEnrollmentResponseLastActivityKind = "SEEN"`

  - `NextSendAt string`

    Estimated time of the next send, from the cadence, send window, pacing and sender; queue order and random gaps can push it later. Null while a message awaits review or is sending, while paused, or when it cannot be estimated.

  - `RemainingSends int64`

    Email and LinkedIn steps not yet sent, connection requests included.

  - `RepliedAt string`

    When the contact first replied, on email or LinkedIn; null if they have not.

  - `Status SequenceRetrieveEnrollmentResponseStatus`

    `ACTIVE` is progressing; `AWAITING_REVIEW` has a message waiting for approval; `NEEDS_ATTENTION` is held by a failed step, a held draft or an unavailable sender; `PAUSED` is stopped because the sequence is deactivated or it was paused in Lightfield. `REPLIED`, `COMPLETED`, `CANCELLED` and `FAILED` are final.

    - `const SequenceRetrieveEnrollmentResponseStatusActive SequenceRetrieveEnrollmentResponseStatus = "ACTIVE"`

    - `const SequenceRetrieveEnrollmentResponseStatusAwaitingReview SequenceRetrieveEnrollmentResponseStatus = "AWAITING_REVIEW"`

    - `const SequenceRetrieveEnrollmentResponseStatusNeedsAttention SequenceRetrieveEnrollmentResponseStatus = "NEEDS_ATTENTION"`

    - `const SequenceRetrieveEnrollmentResponseStatusReplied SequenceRetrieveEnrollmentResponseStatus = "REPLIED"`

    - `const SequenceRetrieveEnrollmentResponseStatusCompleted SequenceRetrieveEnrollmentResponseStatus = "COMPLETED"`

    - `const SequenceRetrieveEnrollmentResponseStatusPaused SequenceRetrieveEnrollmentResponseStatus = "PAUSED"`

    - `const SequenceRetrieveEnrollmentResponseStatusCancelled SequenceRetrieveEnrollmentResponseStatus = "CANCELLED"`

    - `const SequenceRetrieveEnrollmentResponseStatusFailed SequenceRetrieveEnrollmentResponseStatus = "FAILED"`

### Sequence Retrieve Message Response

- `type SequenceRetrieveMessageResponseUnion interface{…}`

  - `type SequenceRetrieveMessageResponseOutboundMessage struct{…}`

    - `ID string`

      Unique identifier of the message.

    - `AcceptedAt string`

      When the connection request was accepted; null until then.

    - `BouncedAt string`

      When the email bounced; null until then.

    - `Channel string`

      Channel the message went over.

      - `const SequenceRetrieveMessageResponseOutboundMessageChannelEmail SequenceRetrieveMessageResponseOutboundMessageChannel = "EMAIL"`

      - `const SequenceRetrieveMessageResponseOutboundMessageChannelLinkedin SequenceRetrieveMessageResponseOutboundMessageChannel = "LINKEDIN"`

    - `ContactID string`

      ID of the contact.

    - `Content SequenceRetrieveMessageResponseOutboundMessageContent`

      Plain-text content of the message. Null when the underlying record is no longer available; not included in list responses.

      - `Body string`

        Plain-text body; null for a connection request sent without a note.

      - `Subject string`

        Email subject; null for LinkedIn.

    - `CreatedAt string`

      When the message was created, or when a reply was received. Lists sort by this field, newest first.

    - `Direction string`

      Always `OUTBOUND`.

      - `const SequenceRetrieveMessageResponseOutboundMessageDirectionOutbound SequenceRetrieveMessageResponseOutboundMessageDirection = "OUTBOUND"`

    - `EnrollmentID string`

      ID of the enrollment the message belongs to.

    - `OpenedAt string`

      When the email was opened; null until then.

    - `ReadAt string`

      When the LinkedIn message was read; null until then.

    - `Reference SequenceRetrieveMessageResponseOutboundMessageReferenceUnion`

      The email or LinkedIn message record behind this sequence message, readable with <u>[Retrieve an email](/api/resources/email/methods/retrieve)</u> or <u>[Retrieve a message](/api/resources/message/methods/retrieve)</u> under their own scopes; null when there is none.

      - `type SequenceRetrieveMessageResponseOutboundMessageReferenceEmail struct{…}`

        - `ID string`

          ID of the email.

        - `ObjectType string`

          Always `email`.

          - `const SequenceRetrieveMessageResponseOutboundMessageReferenceEmailObjectTypeEmail SequenceRetrieveMessageResponseOutboundMessageReferenceEmailObjectType = "email"`

      - `type SequenceRetrieveMessageResponseOutboundMessageReferenceMessage struct{…}`

        - `ID string`

          ID of the message.

        - `ObjectType string`

          Always `message`.

          - `const SequenceRetrieveMessageResponseOutboundMessageReferenceMessageObjectTypeMessage SequenceRetrieveMessageResponseOutboundMessageReferenceMessageObjectType = "message"`

    - `RepliedAt string`

      When the contact replied to this message; null until then.

    - `SentAt string`

      When the message was sent; null until then.

    - `SequenceStepID string`

      ID of the step that sent the message or, for a reply, the step it replied to.

    - `SequenceStepType string`

      Type of that step.

      - `const SequenceRetrieveMessageResponseOutboundMessageSequenceStepTypeEmail SequenceRetrieveMessageResponseOutboundMessageSequenceStepType = "EMAIL"`

      - `const SequenceRetrieveMessageResponseOutboundMessageSequenceStepTypeLinkedinMessage SequenceRetrieveMessageResponseOutboundMessageSequenceStepType = "LINKEDIN_MESSAGE"`

      - `const SequenceRetrieveMessageResponseOutboundMessageSequenceStepTypeLinkedinInvite SequenceRetrieveMessageResponseOutboundMessageSequenceStepType = "LINKEDIN_INVITE"`

    - `Status string`

      `AWAITING_REVIEW` is waiting for approval; `SCHEDULED` is composed and waiting for its send time; `QUEUED` is due and waiting on the sender. `SENT`, `SKIPPED`, `FAILED` and `CANCELLED` are final.

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusAwaitingReview SequenceRetrieveMessageResponseOutboundMessageStatus = "AWAITING_REVIEW"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusScheduled SequenceRetrieveMessageResponseOutboundMessageStatus = "SCHEDULED"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusQueued SequenceRetrieveMessageResponseOutboundMessageStatus = "QUEUED"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusSent SequenceRetrieveMessageResponseOutboundMessageStatus = "SENT"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusSkipped SequenceRetrieveMessageResponseOutboundMessageStatus = "SKIPPED"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusFailed SequenceRetrieveMessageResponseOutboundMessageStatus = "FAILED"`

      - `const SequenceRetrieveMessageResponseOutboundMessageStatusCancelled SequenceRetrieveMessageResponseOutboundMessageStatus = "CANCELLED"`

    - `StatusChangedAt string`

      When `status` last changed.

  - `type SequenceRetrieveMessageResponseReply struct{…}`

    - `ID string`

      Unique identifier of the message.

    - `Channel string`

      Channel the message went over.

      - `const SequenceRetrieveMessageResponseReplyChannelEmail SequenceRetrieveMessageResponseReplyChannel = "EMAIL"`

      - `const SequenceRetrieveMessageResponseReplyChannelLinkedin SequenceRetrieveMessageResponseReplyChannel = "LINKEDIN"`

    - `ContactID string`

      ID of the contact.

    - `Content SequenceRetrieveMessageResponseReplyContent`

      Plain-text content of the message. Null when the underlying record is no longer available; not included in list responses.

      - `Body string`

        Plain-text body; null for a connection request sent without a note.

      - `Subject string`

        Email subject; null for LinkedIn.

    - `CreatedAt string`

      When the message was created, or when a reply was received. Lists sort by this field, newest first.

    - `Direction string`

      Always `INBOUND`.

      - `const SequenceRetrieveMessageResponseReplyDirectionInbound SequenceRetrieveMessageResponseReplyDirection = "INBOUND"`

    - `EnrollmentID string`

      ID of the enrollment the message belongs to.

    - `ReceivedAt string`

      When the reply was received.

    - `Reference SequenceRetrieveMessageResponseReplyReferenceUnion`

      The email or LinkedIn message record behind this sequence message, readable with <u>[Retrieve an email](/api/resources/email/methods/retrieve)</u> or <u>[Retrieve a message](/api/resources/message/methods/retrieve)</u> under their own scopes; null when there is none.

      - `type SequenceRetrieveMessageResponseReplyReferenceEmail struct{…}`

        - `ID string`

          ID of the email.

        - `ObjectType string`

          Always `email`.

          - `const SequenceRetrieveMessageResponseReplyReferenceEmailObjectTypeEmail SequenceRetrieveMessageResponseReplyReferenceEmailObjectType = "email"`

      - `type SequenceRetrieveMessageResponseReplyReferenceMessage struct{…}`

        - `ID string`

          ID of the message.

        - `ObjectType string`

          Always `message`.

          - `const SequenceRetrieveMessageResponseReplyReferenceMessageObjectTypeMessage SequenceRetrieveMessageResponseReplyReferenceMessageObjectType = "message"`

    - `SequenceStepID string`

      ID of the step that sent the message or, for a reply, the step it replied to.

    - `SequenceStepType string`

      Type of that step.

      - `const SequenceRetrieveMessageResponseReplySequenceStepTypeEmail SequenceRetrieveMessageResponseReplySequenceStepType = "EMAIL"`

      - `const SequenceRetrieveMessageResponseReplySequenceStepTypeLinkedinMessage SequenceRetrieveMessageResponseReplySequenceStepType = "LINKEDIN_MESSAGE"`

      - `const SequenceRetrieveMessageResponseReplySequenceStepTypeLinkedinInvite SequenceRetrieveMessageResponseReplySequenceStepType = "LINKEDIN_INVITE"`

### Sequence Retrieve Performance Response

- `type SequenceRetrievePerformanceResponse struct{…}`

  - `ByStepType SequenceRetrievePerformanceResponseByStepType`

    Lifetime totals for each step type, across all of its steps.

    - `Email SequenceRetrievePerformanceResponseByStepTypeEmail`

      Email steps.

      - `Bounced int64`

        Sent emails that bounced.

      - `BounceRate float64`

        Bounced divided by sent; null if none sent.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

      - `Delivered int64`

        Sent minus bounced, never below zero.

      - `Opened int64`

        Sent emails that were opened.

      - `OpenRate float64`

        Opened divided by delivered; null if none delivered.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by delivered; null if none delivered.

      - `Sent int64`

        Messages sent.

    - `LinkedinInvite SequenceRetrievePerformanceResponseByStepTypeLinkedinInvite`

      LinkedIn connection request steps.

      - `AcceptanceRate float64`

        Accepted divided by sent; null if none sent.

      - `Accepted int64`

        Connection requests that were accepted.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

    - `LinkedinMessage SequenceRetrievePerformanceResponseByStepTypeLinkedinMessage`

      LinkedIn message steps.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

      - `Read int64`

        Sent messages that were read.

      - `ReadRate float64`

        Read divided by sent; null if none sent.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

    - `Wait SequenceRetrievePerformanceResponseByStepTypeWait`

      Wait steps.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

    - `WaitForConnection SequenceRetrievePerformanceResponseByStepTypeWaitForConnection`

      Wait-for-connection steps.

      - `CurrentEnrollments int64`

        Enrollments currently on steps of this type, paused ones included.

  - `PerStep []SequenceRetrievePerformanceResponsePerStepUnion`

    Per-step statistics in published sequence order, including steps with no activity. Steps no longer in the published definition are included if they have sent messages.

    - `type SequenceRetrievePerformanceResponsePerStepEmailStep struct{…}`

      - `Bounced int64`

        Sent emails that bounced.

      - `BounceRate float64`

        Bounced divided by sent; null if none sent.

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Delivered int64`

        Sent minus bounced, never below zero.

      - `Opened int64`

        Sent emails that were opened.

      - `OpenRate float64`

        Opened divided by delivered; null if none delivered.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by delivered; null if none delivered.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepEmailStepSequenceStepTypeEmail SequenceRetrievePerformanceResponsePerStepEmailStepSequenceStepType = "EMAIL"`

    - `type SequenceRetrievePerformanceResponsePerStepLinkedInMessageStep struct{…}`

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Read int64`

        Sent messages that were read.

      - `ReadRate float64`

        Read divided by sent; null if none sent.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepLinkedInMessageStepSequenceStepTypeLinkedinMessage SequenceRetrievePerformanceResponsePerStepLinkedInMessageStepSequenceStepType = "LINKEDIN_MESSAGE"`

    - `type SequenceRetrievePerformanceResponsePerStepLinkedInInviteStep struct{…}`

      - `AcceptanceRate float64`

        Accepted divided by sent; null if none sent.

      - `Accepted int64`

        Connection requests that were accepted.

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepLinkedInInviteStepSequenceStepTypeLinkedinInvite SequenceRetrievePerformanceResponsePerStepLinkedInInviteStepSequenceStepType = "LINKEDIN_INVITE"`

    - `type SequenceRetrievePerformanceResponsePerStepWaitStep struct{…}`

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepWaitStepSequenceStepTypeWait SequenceRetrievePerformanceResponsePerStepWaitStepSequenceStepType = "WAIT"`

    - `type SequenceRetrievePerformanceResponsePerStepWaitForConnectionStep struct{…}`

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `SequenceStepID string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepWaitForConnectionStepSequenceStepTypeWaitForConnection SequenceRetrievePerformanceResponsePerStepWaitForConnectionStepSequenceStepType = "WAIT_FOR_CONNECTION"`

### Sequence Retrieve Response

- `type SequenceRetrieveResponse struct{…}`

  - `ID string`

    Unique identifier of the sequence.

  - `Channels []string`

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

    - `const SequenceRetrieveResponseChannelEmail SequenceRetrieveResponseChannel = "EMAIL"`

    - `const SequenceRetrieveResponseChannelLinkedin SequenceRetrieveResponseChannel = "LINKEDIN"`

  - `CreatedAt string`

    ISO 8601 creation timestamp.

  - `Definition SequenceRetrieveResponseDefinition`

    Published configuration, or null before the first publish.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceRetrieveResponseDefinitionMessaging`

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

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

      - `Email SequenceRetrieveResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceRetrieveResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceRetrieveResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceRetrieveResponseDefinitionPriorityHigh SequenceRetrieveResponseDefinitionPriority = "HIGH"`

      - `const SequenceRetrieveResponseDefinitionPriorityNormal SequenceRetrieveResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceRetrieveResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceRetrieveResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceRetrieveResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObjectDeliveryModeAuto SequenceRetrieveResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObjectDeliveryModeForReview SequenceRetrieveResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObjectModeAgent SequenceRetrieveResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObjectTypeEmail SequenceRetrieveResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceRetrieveResponseDefinitionStepObjectTypeLinkedinMessage SequenceRetrieveResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceRetrieveResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject2DeliveryModeAuto SequenceRetrieveResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObject2DeliveryModeForReview SequenceRetrieveResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject2ModeAgent SequenceRetrieveResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObject2TypeLinkedinInvite SequenceRetrieveResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceRetrieveResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject3DeliveryModeAuto SequenceRetrieveResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObject3DeliveryModeForReview SequenceRetrieveResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject3ModeTemplate SequenceRetrieveResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObject3TypeEmail SequenceRetrieveResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceRetrieveResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject4DeliveryModeAuto SequenceRetrieveResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObject4DeliveryModeForReview SequenceRetrieveResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject4ModeTemplate SequenceRetrieveResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObject4TypeLinkedinMessage SequenceRetrieveResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceRetrieveResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject5DeliveryModeAuto SequenceRetrieveResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceRetrieveResponseDefinitionStepObject5DeliveryModeForReview SequenceRetrieveResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject5ModeTemplate SequenceRetrieveResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceRetrieveResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceRetrieveResponseDefinitionStepObject5TypeLinkedinInvite SequenceRetrieveResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceRetrieveResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceRetrieveResponseDefinitionStepObject6TypeWait SequenceRetrieveResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceRetrieveResponseDefinitionStepObject6TypeWaitForConnection SequenceRetrieveResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceRetrieveResponseDefinitionStepObject6UnitDay SequenceRetrieveResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceRetrieveResponseDefinitionStepObject6UnitMinute SequenceRetrieveResponseDefinitionStepObject6Unit = "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 SequenceRetrieveResponseObjectType`

    Always `sequence`.

    - `const SequenceRetrieveResponseObjectTypeSequence SequenceRetrieveResponseObjectType = "sequence"`

  - `Reviewers []SequenceRetrieveResponseReviewer`

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

      Always `member`.

      - `const SequenceRetrieveResponseReviewerObjectTypeMember SequenceRetrieveResponseReviewerObjectType = "member"`

  - `Senders []SequenceRetrieveResponseSender`

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

      Always `sender`.

      - `const SequenceRetrieveResponseSenderObjectTypeSender SequenceRetrieveResponseSenderObjectType = "sender"`

  - `Status SequenceRetrieveResponseStatus`

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

    - `const SequenceRetrieveResponseStatusDraft SequenceRetrieveResponseStatus = "DRAFT"`

    - `const SequenceRetrieveResponseStatusActive SequenceRetrieveResponseStatus = "ACTIVE"`

    - `const SequenceRetrieveResponseStatusDeactivated SequenceRetrieveResponseStatus = "DEACTIVATED"`

### Sequence Retrieve Test Response

- `type SequenceRetrieveTestResponse struct{…}`

  - `ID string`

    ID of the test, an enrollment ID.

  - `ContactID string`

    ID of the contact tested.

  - `Status SequenceRetrieveTestResponseStatus`

    `RUNNING` until every step has finished, then `COMPLETED`, or `FAILED` when the test ended on a failure.

    - `const SequenceRetrieveTestResponseStatusRunning SequenceRetrieveTestResponseStatus = "RUNNING"`

    - `const SequenceRetrieveTestResponseStatusCompleted SequenceRetrieveTestResponseStatus = "COMPLETED"`

    - `const SequenceRetrieveTestResponseStatusFailed SequenceRetrieveTestResponseStatus = "FAILED"`

  - `Steps []SequenceRetrieveTestResponseStep`

    Every step of the tested version that the Sequences API lists, in run order. Call steps are not part of the API yet, so a test reports nothing for them.

    - `Error SequenceRetrieveTestResponseStepError`

      Why the step failed; null unless `outcome` is `FAILED`.

      - `Code string`

        `CONFIGURATION_ERROR` when the sequence or the contact needs a change, `SYSTEM_ERROR` when Lightfield failed.

        - `const SequenceRetrieveTestResponseStepErrorCodeConfigurationError SequenceRetrieveTestResponseStepErrorCode = "CONFIGURATION_ERROR"`

        - `const SequenceRetrieveTestResponseStepErrorCodeSystemError SequenceRetrieveTestResponseStepErrorCode = "SYSTEM_ERROR"`

      - `Message string`

        What went wrong, in plain words.

    - `Message SequenceRetrieveTestResponseStepMessageUnion`

      The composed message; null when the step has not composed one.

      - `type SequenceRetrieveTestResponseStepMessageEmailMessage struct{…}`

        - `Body string`

          Body as markdown, the same form a template step reads back in.

        - `Subject string`

          Subject line, as composed.

      - `type SequenceRetrieveTestResponseStepMessageLinkedInMessage struct{…}`

        - `Body string`

          Message text, as composed.

    - `Mode string`

      How a send step’s content is composed; null for a wait step.

      - `const SequenceRetrieveTestResponseStepModeAgent SequenceRetrieveTestResponseStepMode = "AGENT"`

      - `const SequenceRetrieveTestResponseStepModeTemplate SequenceRetrieveTestResponseStepMode = "TEMPLATE"`

    - `Name string`

      Name of the step, as in `definition.steps`; null for a wait step.

    - `Outcome string`

      `PENDING` while the step has not run, including a step a finished test never reached, `COMPOSED` when it produced a message, `SKIPPED` when it produced nothing: a test never waits, so a wait is always `SKIPPED`, and a send step is `SKIPPED` when it has nothing to send, such as a LinkedIn invite another step already sent. `FAILED` when it failed: see `error`.

      - `const SequenceRetrieveTestResponseStepOutcomePending SequenceRetrieveTestResponseStepOutcome = "PENDING"`

      - `const SequenceRetrieveTestResponseStepOutcomeComposed SequenceRetrieveTestResponseStepOutcome = "COMPOSED"`

      - `const SequenceRetrieveTestResponseStepOutcomeSkipped SequenceRetrieveTestResponseStepOutcome = "SKIPPED"`

      - `const SequenceRetrieveTestResponseStepOutcomeFailed SequenceRetrieveTestResponseStepOutcome = "FAILED"`

    - `StepID string`

      ID of the step, as in the sequence’s `definition.steps`.

    - `Type string`

      Step type.

      - `const SequenceRetrieveTestResponseStepTypeEmail SequenceRetrieveTestResponseStepType = "EMAIL"`

      - `const SequenceRetrieveTestResponseStepTypeLinkedinMessage SequenceRetrieveTestResponseStepType = "LINKEDIN_MESSAGE"`

      - `const SequenceRetrieveTestResponseStepTypeLinkedinInvite SequenceRetrieveTestResponseStepType = "LINKEDIN_INVITE"`

      - `const SequenceRetrieveTestResponseStepTypeWait SequenceRetrieveTestResponseStepType = "WAIT"`

      - `const SequenceRetrieveTestResponseStepTypeWaitForConnection SequenceRetrieveTestResponseStepType = "WAIT_FOR_CONNECTION"`

  - `Target SequenceRetrieveTestResponseTarget`

    Which version was tested.

    - `const SequenceRetrieveTestResponseTargetDraft SequenceRetrieveTestResponseTarget = "DRAFT"`

    - `const SequenceRetrieveTestResponseTargetPublished SequenceRetrieveTestResponseTarget = "PUBLISHED"`

### Sequence Start Test Response

- `type SequenceStartTestResponse struct{…}`

  - `ID string`

    ID of the test, an enrollment ID. Use it to read the result.

  - `ContactID string`

    ID of the contact being tested.

  - `Status SequenceStartTestResponseStatus`

    Always `RUNNING`: the test continues after the response.

    - `const SequenceStartTestResponseStatusRunning SequenceStartTestResponseStatus = "RUNNING"`

  - `Target SequenceStartTestResponseTarget`

    Which version is being tested: the open `DRAFT` when there is one or the sequence was never published, otherwise the `PUBLISHED` version.

    - `const SequenceStartTestResponseTargetDraft SequenceStartTestResponseTarget = "DRAFT"`

    - `const SequenceStartTestResponseTargetPublished SequenceStartTestResponseTarget = "PUBLISHED"`

### Sequence Update Draft Response

- `type SequenceUpdateDraftResponse struct{…}`

  - `Channels []string`

    Channels the draft's steps send on.

    - `const SequenceUpdateDraftResponseChannelEmail SequenceUpdateDraftResponseChannel = "EMAIL"`

    - `const SequenceUpdateDraftResponseChannelLinkedin SequenceUpdateDraftResponseChannel = "LINKEDIN"`

  - `Definition SequenceUpdateDraftResponseDefinition`

    The draft configuration, in the same shape as a published definition.

    - `Description string`

      What this version of the sequence is for.

    - `Messaging SequenceUpdateDraftResponseDefinitionMessaging`

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

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

      - `Email SequenceUpdateDraftResponseDefinitionPacingEmail`

        Email steps.

        - `DailyLimit int64`

          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.

      - `LinkedinInvite SequenceUpdateDraftResponseDefinitionPacingLinkedinInvite`

        LinkedIn connection requests.

        - `DailyLimit int64`

          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.

      - `LinkedinMessage SequenceUpdateDraftResponseDefinitionPacingLinkedinMessage`

        LinkedIn messages.

        - `DailyLimit int64`

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

      Send priority relative to other sequences.

      - `const SequenceUpdateDraftResponseDefinitionPriorityHigh SequenceUpdateDraftResponseDefinitionPriority = "HIGH"`

      - `const SequenceUpdateDraftResponseDefinitionPriorityNormal SequenceUpdateDraftResponseDefinitionPriority = "NORMAL"`

    - `SendWindow SequenceUpdateDraftResponseDefinitionSendWindow`

      When the sequence may send.

      - `DaysOfWeek []int64`

        Days sends may go out, 0 = Sunday.

      - `EndHour int64`

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

      - `StartHour int64`

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

      - `Timezone string`

        IANA timezone of the window.

    - `Steps []SequenceUpdateDraftResponseDefinitionStepUnion`

      Email, LinkedIn and wait steps in execution order.

      - `type SequenceUpdateDraftResponseDefinitionStepObject struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObjectDeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObjectDeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObjectDeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObjectDeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObjectModeAgent SequenceUpdateDraftResponseDefinitionStepObjectMode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObjectTypeEmail SequenceUpdateDraftResponseDefinitionStepObjectType = "EMAIL"`

          - `const SequenceUpdateDraftResponseDefinitionStepObjectTypeLinkedinMessage SequenceUpdateDraftResponseDefinitionStepObjectType = "LINKEDIN_MESSAGE"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject2 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject2DeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObject2DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject2DeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObject2DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject2ModeAgent SequenceUpdateDraftResponseDefinitionStepObject2Mode = "AGENT"`

        - `Name string`

          Display name of the step.

        - `Prompt string`

          Instructions the agent follows when composing this message.

        - `Type string`

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObject2TypeLinkedinInvite SequenceUpdateDraftResponseDefinitionStepObject2Type = "LINKEDIN_INVITE"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject3 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject3DeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObject3DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject3DeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObject3DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject3ModeTemplate SequenceUpdateDraftResponseDefinitionStepObject3Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftResponseDefinitionStepObject3Template`

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

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObject3TypeEmail SequenceUpdateDraftResponseDefinitionStepObject3Type = "EMAIL"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject4 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject4DeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObject4DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject4DeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObject4DeliveryMode = "FOR_REVIEW"`

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject4ModeTemplate SequenceUpdateDraftResponseDefinitionStepObject4Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftResponseDefinitionStepObject4Template`

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

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObject4TypeLinkedinMessage SequenceUpdateDraftResponseDefinitionStepObject4Type = "LINKEDIN_MESSAGE"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject5 struct{…}`

        - `ID string`

          Step identifier, referenced by enrollment `currentStepId` and message `sequenceStepId`.

        - `DeliveryMode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject5DeliveryModeAuto SequenceUpdateDraftResponseDefinitionStepObject5DeliveryMode = "AUTO"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject5DeliveryModeForReview SequenceUpdateDraftResponseDefinitionStepObject5DeliveryMode = "FOR_REVIEW"`

        - `IncludeNote bool`

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

        - `Mode string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject5ModeTemplate SequenceUpdateDraftResponseDefinitionStepObject5Mode = "TEMPLATE"`

        - `Name string`

          Display name of the step.

        - `Template SequenceUpdateDraftResponseDefinitionStepObject5Template`

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

          Step type.

          - `const SequenceUpdateDraftResponseDefinitionStepObject5TypeLinkedinInvite SequenceUpdateDraftResponseDefinitionStepObject5Type = "LINKEDIN_INVITE"`

      - `type SequenceUpdateDraftResponseDefinitionStepObject6 struct{…}`

        - `ID string`

          Step identifier.

        - `Duration int64`

          Length of the wait.

        - `Type string`

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

          - `const SequenceUpdateDraftResponseDefinitionStepObject6TypeWait SequenceUpdateDraftResponseDefinitionStepObject6Type = "WAIT"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject6TypeWaitForConnection SequenceUpdateDraftResponseDefinitionStepObject6Type = "WAIT_FOR_CONNECTION"`

        - `Unit string`

          Unit of `duration`.

          - `const SequenceUpdateDraftResponseDefinitionStepObject6UnitDay SequenceUpdateDraftResponseDefinitionStepObject6Unit = "DAY"`

          - `const SequenceUpdateDraftResponseDefinitionStepObject6UnitMinute SequenceUpdateDraftResponseDefinitionStepObject6Unit = "MINUTE"`

  - `Name string`

    Name the sequence takes when the draft is published.

  - `PublishWarnings []SequenceUpdateDraftResponsePublishWarning`

    What publishing this draft would change for contacts already in the sequence; empty when nothing is affected. Before the first publish, the only possible warning is a proposed sender that was archived and would be left off.

    - `Code string`

      What publishing would change.

      - `const SequenceUpdateDraftResponsePublishWarningCodeDelayShortened SequenceUpdateDraftResponsePublishWarningCode = "delay_shortened"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeDelayLengthened SequenceUpdateDraftResponsePublishWarningCode = "delay_lengthened"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeConnectionWaitShortened SequenceUpdateDraftResponsePublishWarningCode = "connection_wait_shortened"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeConnectionWaitLengthened SequenceUpdateDraftResponsePublishWarningCode = "connection_wait_lengthened"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeSendScheduleChanged SequenceUpdateDraftResponsePublishWarningCode = "send_schedule_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeSendConfigurationChanged SequenceUpdateDraftResponsePublishWarningCode = "send_configuration_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeSendPriorityChanged SequenceUpdateDraftResponsePublishWarningCode = "send_priority_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeSendersChanged SequenceUpdateDraftResponsePublishWarningCode = "senders_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeEmailSenderPoolEmptied SequenceUpdateDraftResponsePublishWarningCode = "email_sender_pool_emptied"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeLinkedinAccountPoolEmptied SequenceUpdateDraftResponsePublishWarningCode = "linkedin_account_pool_emptied"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeAssignedSenderRemoved SequenceUpdateDraftResponsePublishWarningCode = "assigned_sender_removed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeDeliveryBecameAutomatic SequenceUpdateDraftResponsePublishWarningCode = "delivery_became_automatic"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeInviteNoteEnabled SequenceUpdateDraftResponsePublishWarningCode = "invite_note_enabled"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeInviteNoteDisabled SequenceUpdateDraftResponsePublishWarningCode = "invite_note_disabled"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeStepInserted SequenceUpdateDraftResponsePublishWarningCode = "step_inserted"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeAutomaticSendStepInserted SequenceUpdateDraftResponsePublishWarningCode = "automatic_send_step_inserted"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeStepRemoved SequenceUpdateDraftResponsePublishWarningCode = "step_removed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeStepTypeChanged SequenceUpdateDraftResponsePublishWarningCode = "step_type_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeStepOrderChanged SequenceUpdateDraftResponsePublishWarningCode = "step_order_changed"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeFullIdentityRewrite SequenceUpdateDraftResponsePublishWarningCode = "full_identity_rewrite"`

      - `const SequenceUpdateDraftResponsePublishWarningCodeLowIdentityOverlap SequenceUpdateDraftResponsePublishWarningCode = "low_identity_overlap"`

    - `Message string`

      What would change, in plain language.

    - `Severity string`

      `destructive` when contacts already in the sequence may skip, repeat or receive a step they would not have; `warning` otherwise.

      - `const SequenceUpdateDraftResponsePublishWarningSeverityWarning SequenceUpdateDraftResponsePublishWarningSeverity = "warning"`

      - `const SequenceUpdateDraftResponsePublishWarningSeverityDestructive SequenceUpdateDraftResponsePublishWarningSeverity = "destructive"`

    - `StepIDs []string`

      The steps involved; empty for a sequence-wide change.

  - `Reviewers []SequenceUpdateDraftResponseReviewer`

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

      Always `member`.

      - `const SequenceUpdateDraftResponseReviewerObjectTypeMember SequenceUpdateDraftResponseReviewerObjectType = "member"`

  - `Senders []SequenceUpdateDraftResponseSender`

    The senders this draft will publish; new contacts rotate across them. Until a save changes it, this is the sequence’s live list. An archived sender stays listed but never sends; any change to the list drops it.

    - `ID string`

      ID of the sender.

    - `ObjectType string`

      Always `sender`.

      - `const SequenceUpdateDraftResponseSenderObjectTypeSender SequenceUpdateDraftResponseSenderObjectType = "sender"`

  - `SequenceID string`

    The sequence this draft belongs to.

  - `UpdatedAt string`

    When the draft last changed.

  - `Version string`

    Opaque token for the current state of the draft. Send it as `expectedVersion` on the next save, publish or discard; it changes whenever anyone edits the draft.

### Sequence Update Enrollments Response

- `type SequenceUpdateEnrollmentsResponse struct{…}`

  - `Results []SequenceUpdateEnrollmentsResponseResultUnion`

    One result per distinct contact, additions first, then removals.

    - `type SequenceUpdateEnrollmentsResponseResultEnrollmentChanged struct{…}`

      - `ContactID string`

        ID of the contact.

      - `EnrollmentID string`

        ID of the enrollment the outcome applies to.

      - `Outcome string`

        `enrolled` created the enrollment, `already_enrolled` left an open one as is, `unenrolled` cancelled it.

        - `const SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcomeEnrolled SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcome = "enrolled"`

        - `const SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcomeAlreadyEnrolled SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcome = "already_enrolled"`

        - `const SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcomeUnenrolled SequenceUpdateEnrollmentsResponseResultEnrollmentChangedOutcome = "unenrolled"`

    - `type SequenceUpdateEnrollmentsResponseResultNothingToCancel struct{…}`

      - `ContactID string`

        ID of the contact.

      - `EnrollmentID any`

        Always null.

      - `Outcome string`

        The contact had no open enrollment to cancel.

        - `const SequenceUpdateEnrollmentsResponseResultNothingToCancelOutcomeNoActiveEnrollment SequenceUpdateEnrollmentsResponseResultNothingToCancelOutcome = "no_active_enrollment"`
