Chat History
Returns messages exchanged with a single contact, newest first. Identify the contact by either phone (must already exist in your contact directory) or contactId, or read one conversation on any channel, web chat included, with conversationId. Cursor-paginated via before + nextCursor.
GET/v2.0/chats/history
Query Parameters
Query
| Parameter | Type | Description |
|---|---|---|
| phone | string | Recipient phone in international format. Send this, contactId or conversationId |
| contactId | string | Sendiee Contact id. For a contact without a phone, such as a web chat visitor, returns that contact's own chats |
| conversationId | string | One conversation on any channel, from List Conversations. Use this for web chat. Unknown id is 404 CONVERSATION_NOT_FOUND |
| defaultCountryCode | string | Used with phone if it's a local number |
| limit | number | 1–100. Default 20 |
| before | string (ISO 8601) | Cursor — return messages older than this timestamp. Use the previous response's nextCursor |
| brandNumber | string | Only return messages exchanged with this business number (for organizations with several WhatsApp numbers) |
| excludeInternal | boolean | true hides inbox-only notes (lead-categorization summaries, operator memory notes, assignment summaries) that were never sent to the customer. Default false |
Phone must exist as a contact
Sendiee requires a Contact record before returning chat history (so we can scope the query strictly to your org). If the phone is unknown the response is
404 CONTACT_NOT_FOUND — call Create / Update Contact first if needed.Example
curl -X GET "https://api.sendiee.com/v2.0/chats/history?phone=919876543210&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"success": true,
"data": [
{
"messageId": "664a...",
"wamid": "wamid.HBg...",
"platform": "whatsapp",
"direction": "outbound",
"origin": "campaign",
"internal": false,
"status": "delivered",
"type": "template",
"text": null,
"media": null,
"components": {},
"reactions": {
"user": null,
"brand": null
},
"campaignId": "664c...",
"cost": {
"amount": 0.83,
"currency": "INR",
"category": "marketing"
},
"createdAt": "2026-04-29T05:18:42.000Z"
},
{
"messageId": "664b...",
"wamid": "wamid.HBh...",
"platform": "whatsapp",
"direction": "inbound",
"origin": null,
"internal": false,
"status": "received",
"type": "text",
"text": "Thanks!",
"media": null,
"components": null,
"reactions": {
"user": null,
"brand": null
},
"campaignId": null,
"cost": null,
"createdAt": "2026-04-29T05:18:00.000Z"
}
],
"pagination": {
"limit": 20,
"hasMore": true,
"nextCursor": "2026-04-29T05:18:00.000Z"
},
"contact": {
"phone": "919876543210",
"window": {
"open": true,
"lastInboundAt": "2026-04-29T05:18:00.000Z",
"closesAt": "2026-04-30T05:18:00.000Z"
}
}
}Web chat threads
Pass the conversationId of a web chat conversation (from List Conversations with platform=web). Each message has platform: "web", and wamid is null. Web chat has no 24-hour reply window, so contact.window is null.
cURL
curl -X GET "https://api.sendiee.com/v2.0/chats/history?conversationId=6724c2d19d2b4e0011ab7702&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"contact.platform is present when the thread was found by conversationId, or by the contactId of a contact without a phone number.