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. Cursor-paginated via before + nextCursor.

GET/v2.0/chats/history

Query Parameters

Query

ParameterTypeDescription
phonestringRecipient phone in international format. Either this or contactId
contactIdstringSendiee Contact id. Either this or phone
defaultCountryCodestringUsed with phone if it's a local number
limitnumber1–100. Default 20
beforestring (ISO 8601)Cursor — return messages older than this timestamp. Use the previous response's nextCursor

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...",
      "direction": "outbound",
      "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...",
      "direction": "inbound",
      "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"
  }
}