## Retrieve a sequence message

`sequence.retrieve_message(strmessage_id, SequenceRetrieveMessageParams**kwargs)  -> 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

- `id: str`

  Unique identifier of the sequence.

- `message_id: str`

  Unique identifier of the message to retrieve.

### Returns

- `SequenceRetrieveMessageResponse`

  - `class OutboundMessage: …`

    - `id: str`

      Unique identifier of the message.

    - `accepted_at: Optional[str]`

      When the connection request was accepted; null until then.

    - `bounced_at: Optional[str]`

      When the email bounced; null until then.

    - `channel: Literal["EMAIL", "LINKEDIN"]`

      Channel the message went over.

      - `"EMAIL"`

      - `"LINKEDIN"`

    - `contact_id: str`

      ID of the contact.

    - `content: Optional[OutboundMessageContent]`

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

      - `body: Optional[str]`

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

      - `subject: Optional[str]`

        Email subject; null for LinkedIn.

    - `created_at: str`

      When the message was created, or when a reply was received. Lists sort by this field, newest first.

    - `direction: Literal["OUTBOUND"]`

      Always `OUTBOUND`.

      - `"OUTBOUND"`

    - `enrollment_id: str`

      ID of the enrollment the message belongs to.

    - `opened_at: Optional[str]`

      When the email was opened; null until then.

    - `read_at: Optional[str]`

      When the LinkedIn message was read; null until then.

    - `reference: Optional[OutboundMessageReference]`

      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.

      - `class OutboundMessageReferenceEmail: …`

        - `id: str`

          ID of the email.

        - `object_type: Literal["email"]`

          Always `email`.

          - `"email"`

      - `class OutboundMessageReferenceMessage: …`

        - `id: str`

          ID of the message.

        - `object_type: Literal["message"]`

          Always `message`.

          - `"message"`

    - `replied_at: Optional[str]`

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

    - `sent_at: Optional[str]`

      When the message was sent; null until then.

    - `sequence_step_id: str`

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

    - `sequence_step_type: Literal["EMAIL", "LINKEDIN_MESSAGE", "LINKEDIN_INVITE"]`

      Type of that step.

      - `"EMAIL"`

      - `"LINKEDIN_MESSAGE"`

      - `"LINKEDIN_INVITE"`

    - `status: Literal["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"`

    - `status_changed_at: str`

      When `status` last changed.

  - `class Reply: …`

    - `id: str`

      Unique identifier of the message.

    - `channel: Literal["EMAIL", "LINKEDIN"]`

      Channel the message went over.

      - `"EMAIL"`

      - `"LINKEDIN"`

    - `contact_id: str`

      ID of the contact.

    - `content: Optional[ReplyContent]`

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

      - `body: Optional[str]`

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

      - `subject: Optional[str]`

        Email subject; null for LinkedIn.

    - `created_at: str`

      When the message was created, or when a reply was received. Lists sort by this field, newest first.

    - `direction: Literal["INBOUND"]`

      Always `INBOUND`.

      - `"INBOUND"`

    - `enrollment_id: str`

      ID of the enrollment the message belongs to.

    - `received_at: str`

      When the reply was received.

    - `reference: Optional[ReplyReference]`

      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.

      - `class ReplyReferenceEmail: …`

        - `id: str`

          ID of the email.

        - `object_type: Literal["email"]`

          Always `email`.

          - `"email"`

      - `class ReplyReferenceMessage: …`

        - `id: str`

          ID of the message.

        - `object_type: Literal["message"]`

          Always `message`.

          - `"message"`

    - `sequence_step_id: str`

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

    - `sequence_step_type: Literal["EMAIL", "LINKEDIN_MESSAGE", "LINKEDIN_INVITE"]`

      Type of that step.

      - `"EMAIL"`

      - `"LINKEDIN_MESSAGE"`

      - `"LINKEDIN_INVITE"`

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
sequence_retrieve_message_response = client.sequence.retrieve_message(
    message_id="messageId",
    id="id",
)
print(sequence_retrieve_message_response)
```

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