---
title: "List messages"
method: GET
path: "/accounts/{account_id}/messages"
tags: ["Messages"]
---

# List messages

`GET /accounts/{account_id}/messages`

List all messages for an account with cursor-based pagination.

## Path parameters

- `account_id` string, required — The account ID to list messages for.

## Query parameters

- `after` string — Cursor for forward pagination. Use the next_cursor from a previous response.
- `before` string — Cursor for backward pagination. Use the previous_cursor from a previous response.

## Response `200`

List of messages

- MessageList — A paginated list of messages
  - `data` Message[], required — The list of messages
    - `attachments` Attachment[]
      - `id` string — Unique identifier for the object.
      - `type` 'file' | 'image' | 'link' | 'contact' | 'video' — The type of attachment.
      - `url` string — The URL of the attachment.
    - `blast_id` string, nullable — The ID of the blast this message belongs to, if any. This can be used to attribute messages back to a specific blast.
    - `body` string, nullable — The message body.
    - `conversation` Conversation — A conversation with a Contact
      - `contact` Contact, required — A contact who has consented to receive messages
        - `email` string, email — The contact's email address.
        - `first_name` string — The contact's first name.
        - `id` string, required — Unique identifier for the object.
        - `last_name` string — The contact's last name.
        - `metadata` Metadata — Set of key-value pairs that will be stored with the object.
        - `phone_number` string, phone-number, required — The contact's phone number in E.164 format.
      - `id` string, required — Unique identifier for the object.
      - `phone_number` ConversationPhoneNumber — This is the phone number tied to the Surge account.
        - `id` string, required — Unique identifier for the phone number
        - `name` string, nullable, required — A human-readable name for the phone number
        - `number` string, phone-number, required — The canonical format of the phone number.
        - `type` 'local' | 'toll_free' | 'short_code' | 'demo', required — Whether the phone number is local, toll-free, or short code
    - `id` string — Unique identifier for the object.
    - `metadata` Metadata — Set of key-value pairs that will be stored with the object.
  - `pagination` Pagination, required — Cursor-based pagination information
    - `next_cursor` string, nullable — Cursor for the next page of results. Null if there is no next page.
    - `previous_cursor` string, nullable — Cursor for the previous page of results. Null if there is no previous page.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/surgeapi/apis/surge.md) · [All operations](https://skmtc.net/surgeapi/apis/surge/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/surgeapi/surge/revisions/b5b0b6f62245/schema)
