## 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
}
```
