Skip to content

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 List endpoints 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: sequences:read

Rate limit category: Search

ParametersExpand Collapse
id string

Unique identifier of the sequence.

query SequenceListEnrollmentsParams
Limit param.Field[int64]Optional

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

minimum1
maximum9007199254740991
Offset param.Field[int64]Optional

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

minimum0
maximum9007199254740991
ReturnsExpand Collapse
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.

One of the following:
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.

minimum-9007199254740991
maximum9007199254740991
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.

One of the following:
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
TotalCount int64
minimum-9007199254740991
maximum9007199254740991

List sequence enrollments

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)
}
{
  "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
}
Returns Examples
{
  "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
}