API referenceWhatsapp chats
GET
/whatsapp/api/v1/chats/{id}/messages

From Swarmhit's stored history, newest first; readable while the number reconnects.

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Path Parameters

id*string

A chat id (wac_…), or a WhatsApp JID / phone number together with account_id.

Query Parameters

account_id?string

The account the id belongs to: required when the path names a JID or a phone number instead of Swarmhit's id.

Lengthlength <= 4096
sender_id?string

Only messages from this person: a JID or a phone number.

Lengthlength <= 128
limit?integer

Items per page, 1 to 250. Default 100.

Range1 <= value <= 250
Default100
cursor?string

The cursor the previous page answered, passed back unchanged, for the next page (newest first). Leave it out for the first page; a null cursor means there is no next page. Keep the same filters from page to page: a page never skips or repeats an item that arrives meanwhile.

Lengthlength <= 200
before?string

Only items strictly older than this date: ISO 8601 with a time zone, e.g. 2026-10-31T00:00:00Z. A value that is not a date answers 400.

Lengthlength <= 40
after?string

Only items strictly newer than this date: ISO 8601 with a time zone, e.g. 2026-10-31T00:00:00Z. A value that is not a date answers 400.

Lengthlength <= 40

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/whatsapp/api/v1/chats/wac_k3J9sLq2Vx8nB4mR/messages?account_id=wa_Xk2pQ9rT4vW8yZ1a&sender_id=33612345678%40s.whatsapp.net"
{  "object": "MessageList",  "items": [    {      "object": "Message",      "id": "wam_P7tR2wQ9zL4kN8vX",      "provider_id": "3EB0C431D2A1B5E6F7A8",      "account_id": "wa_Xk2pQ9rT4vW8yZ1a",      "chat_id": "wac_k3J9sLq2Vx8nB4mR",      "chat_provider_id": "33612345678@s.whatsapp.net",      "sender_id": "33612345678@s.whatsapp.net",      "sender_attendee_id": "waa_H5gT8kL2mQ9wR3vB",      "text": "Hi, thanks for reaching out!",      "attachments": [],      "timestamp": "2026-10-31T09:30:00.000Z",      "is_sender": 0,      "is_forwarded": false,      "is_view_once": false,      "reactions": [],      "seen": 0,      "seen_by": {},      "hidden": 0,      "deleted": 0,      "edited": 0,      "is_event": 0,      "delivered": 1,      "behavior": null,      "original": "",      "message_type": "MESSAGE"    }  ],  "cursor": null}