Retrieve messages by AI contact with pagination
Paginated message history, newest first. Prefer this over v2: page is 1-based and echoed back unchanged, page_size is configurable, and total/pages describe exactly what data contains — data.length never exceeds page_size, and summing data across all pages equals total. Unlike v2, the response contains only real messages: the synthetic “stage” and “interactive_note” entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty data with has_next_page: false.
Overview
Retrieve a contact’s messages with pagination, newest first. This is the recommended endpoint for reading message history. Use this instead of v2:page is 1-based and echoed back unchanged, page_size is configurable, and the counters describe exactly what you receive.
Authentication
Include your API key in the request header:Path Parameters
Query Parameters
page below 1, page_size outside 1–100, and fractional values are rejected with 400.
Response Structure
data never holds more than page_size
items, and summing data across all pages equals total.Message Object
This list is exhaustive and identical on every channel — the response carries these fields and nothing else:whatsapp_message on top of the flattened
fields, plus the ticket, summary and activity graph. If you depend on a field
that only exists there, tell us and we will consider adding it to v3 rather
than exposing the internal row.stage
and interactive_note entries that v2 mixes into its list are not messages
and are not returned here.Example Request
Example Response
Fetching the Full History
data with has_next_page: false.
Error Responses
Important Notes
- Order is newest first. Page 1 holds the most recent messages.
- Reading is side-effect free. Unlike v2, fetching messages here does not mark the conversation as read, so polling this endpoint never changes what your agents see as unread.
- Deleted Instagram messages are excluded from
data,totalandpages. - Cross-channel: works for every channel a contact may use.
Related Endpoints
- GET /api/public/contact/v2//messages — legacy paginated history
- GET /api/public/contact//conversations — messages grouped into conversations
- GET /api/public/contact//info — contact info
Headers
API key required to authorize the request
Path Parameters
ID of the AI contact
Query Parameters
Page number, 1-based. Page 1 returns the newest messages. Defaults to 1.
1 <= x <= 90071992547409911
Messages per page, between 1 and 100. Defaults to 15.
1 <= x <= 10015
Response
Messages retrieved successfully.
Messages for this page, newest first. The shape below is exhaustive and identical across channels: no channel-specific or internal fields are returned.
The requested page, echoed back.
1
15
Total number of pages. Valid values for page are 1..pages.
3
Total messages for this contact, across all pages.
45
true
