List WhatsApp conversations
List recent WhatsApp conversations available to the connected WhatSync account.
- Key permissions
- Read chats and messages
- Authentication
Authorization: Bearer $WHATSYNC_API_KEY
How keys work
How it works
- Optionally filter by contact name, phone number, conversation identifier, or date window.
- Names match word by word in any order.
- A date window longer than 366 days is shortened to the 366 days ending at before, and the result says so.
- Results are paginated and never include excluded numbers.
Body parameters
querystringoptionalOptional contact name, phone number, or conversation identifier
afterstring · date-timeoptionalList conversations active at or after this ISO timestamp; defaults to the 180 days ending at before, or all saved history when query is given
beforestring · date-timeoptionalReturn conversations active before this ISO timestamp; must be later than after
cursorstringoptionalOpaque next_cursor returned by the previous page
limitintegeroptionalNumber of conversations to return; defaults to 20
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
Input JSON Schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"maxLength": 120,
"description": "Optional contact name, phone number, or conversation identifier"
},
"after": {
"type": "string",
"format": "date-time",
"description": "List conversations active at or after this ISO timestamp; defaults to the 180 days ending at before, or all saved history when query is given"
},
"before": {
"type": "string",
"format": "date-time",
"description": "Return conversations active before this ISO timestamp; must be later than after"
},
"cursor": {
"type": "string",
"maxLength": 600,
"description": "Opaque next_cursor returned by the previous page"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"description": "Number of conversations to return; defaults to 20"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Response JSON Schema
Response JSON Schema
{
"type": "object",
"properties": {
"conversations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"conversation_id": {
"type": [
"string",
"null"
]
},
"channel": {
"type": [
"string",
"null"
]
},
"contact_name": {
"type": [
"string",
"null"
]
},
"last_message_at": {
"type": [
"string",
"null"
]
},
"message_count": {
"type": "number"
},
"inbound_count": {
"type": "number"
},
"outbound_count": {
"type": "number"
},
"is_group": {
"type": "boolean"
}
},
"required": [],
"additionalProperties": true
}
},
"has_more": {
"type": "boolean"
},
"next_cursor": {
"type": [
"string",
"null"
]
},
"next_before": {
"type": [
"string",
"null"
]
},
"listed_after": {
"type": "string"
},
"listed_before": {
"type": "string"
},
"message_access_starts_at": {
"type": "string"
},
"search_note": {
"type": [
"string",
"null"
]
}
},
"required": [],
"additionalProperties": true
}