Skip to main content
GET
/
v1
/
messages
List messages
curl --request GET \
  --url https://api.messages.dev/v1/messages \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "line_id": "<string>",
      "chat_id": "<string>",
      "guid": "<string>",
      "sender": "<string>",
      "text": "<string>",
      "attachments": [
        {
          "filename": "<string>",
          "mime_type": "<string>",
          "size": 123,
          "url": "<string>"
        }
      ],
      "service": "<string>",
      "is_from_me": true,
      "sent_at": 123,
      "synced_at": 123,
      "outbox_id": "<string>",
      "reply_to_guid": "<string>"
    }
  ],
  "has_more": true,
  "next_cursor": "<string>",
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Use an API key as a bearer token: Authorization: Bearer sk_live_...

Query Parameters

from
string
required

Line handle (phone number or Apple ID)

Example:

"+15551234567"

to
string
required

Chat identifier (phone number, Apple ID, or chat ID)

Example:

"+15559876543"

limit
integer
default:50

Maximum number of items to return (1-100, default: 50)

Required range: 1 <= x <= 100
cursor
string

Opaque cursor for pagination. Use the next_cursor value from a previous response.

Response

List of messages

data
object[]
has_more
boolean

Whether more items exist beyond this page

next_cursor
string | null

Cursor to pass as cursor query parameter for the next page

request_id
string