Retrieve paginated messages inside one conversation.
Conversation Messages
Summary
Retrieve paginated messages inside one conversation.
Prerequisites
- Authorization: Bearer w91_live_xxx
- Content-Type: application/json for JSON requests
Related documentation
Endpoint: GET /api/v2/reports/conversations/{conversationId}/messages. Use this endpoint to retrieve paginated messages inside one conversation.
GET
/api/v2/reports/conversations/{conversationId}/messages| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization | header | Required | Bearer w91_live_xxxxxxxxxxxxxxxxx. |
conversationId | number | Required | Existing numeric conversation id. |
senderId | string | Optional | WhatsApp sender phone number. |
direction | string | Optional | inbound or outbound. |
messageType | string | Optional | text, image, video, document, interactive, etc. |
status | string | Optional | pending, sent, delivered, read, failed, or all. |
search | string | Optional | Matches message text. |
page | number | Optional | Positive integer. Default 1. |
limit | number | Optional | Positive integer. Default 50, max 200. |
sortBy | string | Optional | timestamp, created_at, or updated_at. |
sortOrder | string | Optional | ASC or DESC. |
Conversation messages
curl "https://graph.whats91.com/api/v2/reports/conversations/194977/messages?senderId=919999999999&direction=inbound&page=1&limit=50" \
-H "Authorization: Bearer w91_live_xxx"Messages response
{
"success": true,
"message": "Conversation messages retrieved",
"data": {
"conversationId": 194977,
"messages": [
{
"messageId": "wamid.xxxxx",
"fromPhone": "919343841961",
"toPhone": "919999999999",
"direction": "inbound",
"messageType": "text",
"messageContent": "hi",
"mediaUrl": null,
"mediaMimeType": null,
"mediaFilename": null,
"mediaCaption": null,
"status": "read",
"isRead": true,
"isPinned": false,
"isStarred": false,
"timestamp": "2026-06-05T06:08:48.000Z",
"errorMessage": null,
"interactiveData": null,
"locationData": null,
"contactData": null
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 1,
"totalPages": 1,
"count": 1,
"hasMore": false
}
}
}Raw inbound/outbound payload dumps, internal database user IDs, encrypted values, and access tokens are never returned.
Error Responses
| HTTP | Error code | Meaning |
|---|---|---|
| 401 | MISSING_AUTH_TOKEN | No public token was supplied. |
| 401 | INVALID_AUTH_TOKEN | Token is invalid, expired, revoked, or not tied to an active customer. |
| 403 | SENDER_NOT_ALLOWED | Number-scoped token requested another sender. |
| 403 | FEATURE_NOT_AVAILABLE | The customer does not have message reports access. |
| 400 | WHATSAPP_SETUP_INCOMPLETE | Sender context could not resolve a usable WhatsApp number. |
| 400 | VALIDATION_FAILED | Invalid date range, pagination, boolean, status, sort field, label mode, conversation id, or mobile number. |
| 404 | CONVERSATION_NOT_FOUND | Conversation id does not belong to the authenticated customer and sender. |
Validation error example
{
"success": false,
"message": "sortBy is not supported for conversations",
"error_code": "VALIDATION_FAILED",
"metadata": {
"apiVersion": "v2",
"requestId": "request-uuid"
}
}SDK Examples
Use these examples as starting points for server-side implementations.
cURL
curl -X GET "https://graph.whats91.com/api/v2/reports/conversations/{conversationId}/messages" \
-H "Authorization: Bearer w91_live_xxx"Node.js
const response = await fetch("https://graph.whats91.com/api/v2/reports/conversations/{conversationId}/messages", {
method: "GET",
headers: {
"Authorization": "Bearer w91_live_xxx",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);PHP
$ch = curl_init("https://graph.whats91.com/api/v2/reports/conversations/{conversationId}/messages");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer w91_live_xxx",
"Content-Type: application/json"
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Python
import requests
response = requests.request(
"GET",
"https://graph.whats91.com/api/v2/reports/conversations/{conversationId}/messages",
headers={
"Authorization": "Bearer w91_live_xxx",
"Content-Type": "application/json",
}
)
print(response.json())C#
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer w91_live_xxx");
var request = new HttpRequestMessage(HttpMethod.Get, "https://graph.whats91.com/api/v2/reports/conversations/{conversationId}/messages");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Related APIs
Conversations
List conversation report records for the resolved WhatsApp sender.
Summary
Return aggregate conversation totals for the same conversation filters.
By Mobile
List conversation thread summaries for one recipient mobile number.
Get Conversation
Retrieve one conversation by numeric conversation id.