v1
latestOpenAPI 3.1.02026-07-22115189303.8 KBMessages
List messages
Query WhatsApp messages across all conversations. Results are returned newest first. Use cursor pagination (limit, after, before) to traverse large message histories efficiently.
get/whatsapp/messages
Query parameters
phone_number_idstring
Filter by WhatsApp phone number ID
conversation_idstring uuid
Filter by conversation ID
phone_numberstring
Filter by contact phone number (partial match)
business_scoped_user_idstring
Filter by exact WhatsApp business-scoped user ID
direction'inbound' | 'outbound'
Filter by message direction
status'pending' | 'sent' | 'delivered' | 'read' | 'failed'
Filter by message status
message_typestring
Filter by message type
has_mediaboolean
Filter messages with media attachments
limitinteger
Maximum number of results per cursor-paginated page (default 20, max 100).
beforestring
Cursor for the previous page (Base64 encoded).
afterstring
Cursor for the next page (Base64 encoded).
Response
List of messages
Example response
{
"data": [
{
"id": "wamid.HBgLMTU1NTEyMzQ1NjcVAgASGBQzQUY5",
"timestamp": "1705329600",
"from": "15551234567",
"from_user_id": "US.13491208655302741918",
"from_parent_user_id": "US.ENT.506847293015824",
"to": "15551234567",
"to_user_id": "US.13491208655302741918",
"to_parent_user_id": "US.ENT.506847293015824",
"username": "@testusername"
}
]
}