Skip to content

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 Sequence message access.

Required scope: sequences:read

Rate limit category: Read

ParametersExpand Collapse
messageID string

Unique identifier of the message to retrieve.

query SequenceGetMessageParams
ID param.Field[string]

Unique identifier of the sequence.

ReturnsExpand Collapse
type SequenceRetrieveMessageResponseUnion interface{…}
One of the following:
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.

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

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

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

ID of the email.

ObjectType string

Always email.

type SequenceRetrieveMessageResponseOutboundMessageReferenceMessage 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 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.

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

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

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

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

ID of the email.

ObjectType string

Always email.

type SequenceRetrieveMessageResponseReplyReferenceMessage 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 SequenceRetrieveMessageResponseReplySequenceStepTypeEmail SequenceRetrieveMessageResponseReplySequenceStepType = "EMAIL"
const SequenceRetrieveMessageResponseReplySequenceStepTypeLinkedinMessage SequenceRetrieveMessageResponseReplySequenceStepType = "LINKEDIN_MESSAGE"
const SequenceRetrieveMessageResponseReplySequenceStepTypeLinkedinInvite SequenceRetrieveMessageResponseReplySequenceStepType = "LINKEDIN_INVITE"

Retrieve a sequence message

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