## Retrieve a sequence message

`client.sequence.retrieveMessage(stringmessageID, SequenceRetrieveMessageParamsparams, RequestOptionsoptions?): SequenceRetrieveMessageResponse`

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

- `params: SequenceRetrieveMessageParams`

  - `id: string`

    Unique identifier of the sequence.

### Returns

- `SequenceRetrieveMessageResponse = OutboundMessage | Reply`

  - `OutboundMessage`

    - `id: string`

      Unique identifier of the message.

    - `acceptedAt: string | null`

      When the connection request was accepted; null until then.

    - `bouncedAt: string | null`

      When the email bounced; null until then.

    - `channel: "EMAIL" | "LINKEDIN"`

      Channel the message went over.

      - `"EMAIL"`

      - `"LINKEDIN"`

    - `contactId: string`

      ID of the contact.

    - `content: Content | null`

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

      - `body: string | null`

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

      - `subject: string | null`

        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: "OUTBOUND"`

      Always `OUTBOUND`.

      - `"OUTBOUND"`

    - `enrollmentId: string`

      ID of the enrollment the message belongs to.

    - `openedAt: string | null`

      When the email was opened; null until then.

    - `readAt: string | null`

      When the LinkedIn message was read; null until then.

    - `reference: Email | Message | null`

      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.

      - `Email`

        - `id: string`

          ID of the email.

        - `objectType: "email"`

          Always `email`.

          - `"email"`

      - `Message`

        - `id: string`

          ID of the message.

        - `objectType: "message"`

          Always `message`.

          - `"message"`

    - `repliedAt: string | null`

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

    - `sentAt: string | null`

      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: "EMAIL" | "LINKEDIN_MESSAGE" | "LINKEDIN_INVITE"`

      Type of that step.

      - `"EMAIL"`

      - `"LINKEDIN_MESSAGE"`

      - `"LINKEDIN_INVITE"`

    - `status: "AWAITING_REVIEW" | "SCHEDULED" | "QUEUED" | 4 more`

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

      - `"AWAITING_REVIEW"`

      - `"SCHEDULED"`

      - `"QUEUED"`

      - `"SENT"`

      - `"SKIPPED"`

      - `"FAILED"`

      - `"CANCELLED"`

    - `statusChangedAt: string`

      When `status` last changed.

  - `Reply`

    - `id: string`

      Unique identifier of the message.

    - `channel: "EMAIL" | "LINKEDIN"`

      Channel the message went over.

      - `"EMAIL"`

      - `"LINKEDIN"`

    - `contactId: string`

      ID of the contact.

    - `content: Content | null`

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

      - `body: string | null`

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

      - `subject: string | null`

        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: "INBOUND"`

      Always `INBOUND`.

      - `"INBOUND"`

    - `enrollmentId: string`

      ID of the enrollment the message belongs to.

    - `receivedAt: string`

      When the reply was received.

    - `reference: Email | Message | null`

      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.

      - `Email`

        - `id: string`

          ID of the email.

        - `objectType: "email"`

          Always `email`.

          - `"email"`

      - `Message`

        - `id: string`

          ID of the message.

        - `objectType: "message"`

          Always `message`.

          - `"message"`

    - `sequenceStepId: string`

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

    - `sequenceStepType: "EMAIL" | "LINKEDIN_MESSAGE" | "LINKEDIN_INVITE"`

      Type of that step.

      - `"EMAIL"`

      - `"LINKEDIN_MESSAGE"`

      - `"LINKEDIN_INVITE"`

### Example

```typescript
import Lightfield from 'lightfield';

const client = new Lightfield({
  apiKey: 'My API Key',
});

const sequenceRetrieveMessageResponse = await client.sequence.retrieveMessage('messageId', {
  id: 'id',
});

console.log(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"
}
```
