Read a WhatsApp conversation
Read a bounded page of messages from one WhatsApp conversation in chronological order.
- Key permissions
- Read chats and messages
- Authentication
Authorization: Bearer $WHATSYNC_API_KEY
How keys work
How it works
Pass the exact conversation_id returned by list_conversations or search_messages as conversationId.
Body parameters
conversationIdstringrequiredThe exact conversation_id value returned by another WhatSync tool
beforestring · date-timeoptionalReturn messages before this ISO timestamp
cursorstringoptionalOpaque next_cursor returned by the previous page
limitintegeroptionalNumber of messages to return; defaults to 20
afterstring · date-timeoptionalReturn only messages at or after this ISO timestamp; the newest ones come first and next_cursor pages back toward it
Conditions and pagination
- Pass the returned next_cursor unchanged as cursor, keeping the same filters. Stop when it is null. A page is not the complete history.
Response
HTTP 200 returns this tool's JSON directly, without an MCP content wrapper. Optional provider fields may be absent or null; check pagination and coverage before treating a page as complete.
Every response includes X-Request-Id. Errors use the shared error format and retry rules.
Schemas
Input JSON Schema
{
"type": "object",
"properties": {
"conversationId": {
"type": "string",
"minLength": 1,
"maxLength": 250,
"description": "The exact conversation_id value returned by another WhatSync tool"
},
"before": {
"type": "string",
"format": "date-time",
"description": "Return messages before this ISO timestamp"
},
"cursor": {
"type": "string",
"maxLength": 600,
"description": "Opaque next_cursor returned by the previous page"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"description": "Number of messages to return; defaults to 20"
},
"after": {
"type": "string",
"format": "date-time",
"description": "Return only messages at or after this ISO timestamp; the newest ones come first and next_cursor pages back toward it"
}
},
"required": [
"conversationId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Response JSON Schema
{
"type": "object",
"properties": {
"conversation_id": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message_id": {
"type": [
"string",
"null"
]
},
"conversation_id": {
"type": [
"string",
"null"
]
},
"channel": {
"type": [
"string",
"null"
]
},
"sent_at": {
"type": [
"string",
"null"
]
},
"direction": {
"type": [
"string",
"null"
]
},
"sender": {
"type": [
"string",
"null"
]
},
"recipient": {
"type": [
"string",
"null"
]
},
"contact_name": {
"type": [
"string",
"null"
]
},
"group_name": {
"type": [
"string",
"null"
]
},
"participant_id": {
"type": [
"string",
"null"
]
},
"provider_phone_number_id": {
"type": [
"string",
"null"
]
},
"quoted_message_id": {
"type": [
"string",
"null"
]
},
"delivery_status": {
"type": [
"string",
"null"
]
},
"type": {
"type": [
"string",
"null"
]
},
"text": {
"type": [
"string",
"null"
]
},
"attachment": {
"anyOf": [
{
"type": "object",
"additionalProperties": true,
"description": "Provider or tool-specific fields; preserve unknown fields."
},
{
"type": "null"
}
]
}
},
"required": [],
"additionalProperties": true
}
},
"chronological_order": {
"type": "boolean"
},
"has_older_messages": {
"type": "boolean"
},
"next_before": {
"type": [
"string",
"null"
]
},
"next_cursor": {
"type": [
"string",
"null"
]
}
},
"required": [],
"additionalProperties": true
}