Skip to content

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

Rate limit category: Search

ParametersExpand Collapse
id string

Unique identifier of the sequence.

query SequenceListMessagesParams
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 SequenceListMessagesResponse struct{…}
Data []SequenceListMessagesResponseDataUnion
One of the following:
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.

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

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 Retrieve an email or Retrieve a message under their own scopes; null when there is none.

One of the following:
type SequenceListMessagesResponseDataOutboundMessageReferenceEmail struct{…}
ID string

ID of the email.

ObjectType string

Always email.

type SequenceListMessagesResponseDataOutboundMessageReferenceMessage struct{…}
ID string

ID of the message.

ObjectType string

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

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

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

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

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 Retrieve an email or Retrieve a message under their own scopes; null when there is none.

One of the following:
type SequenceListMessagesResponseDataReplyReferenceEmail struct{…}
ID string

ID of the email.

ObjectType string

Always email.

type SequenceListMessagesResponseDataReplyReferenceMessage struct{…}
ID string

ID of the message.

ObjectType string

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

One of the following:
const SequenceListMessagesResponseDataReplySequenceStepTypeEmail SequenceListMessagesResponseDataReplySequenceStepType = "EMAIL"
const SequenceListMessagesResponseDataReplySequenceStepTypeLinkedinMessage SequenceListMessagesResponseDataReplySequenceStepType = "LINKEDIN_MESSAGE"
const SequenceListMessagesResponseDataReplySequenceStepTypeLinkedinInvite SequenceListMessagesResponseDataReplySequenceStepType = "LINKEDIN_INVITE"
Object SequenceListMessagesResponseObject
TotalCount int64
minimum-9007199254740991
maximum9007199254740991

List sequence messages

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