API referenceWhatsapp chats
GET
/whatsapp/api/v1/chats

From Swarmhit's stored history, newest activity first. A chat is listed from its first message.

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Query Parameters

account_id?string

Only these accounts: one wa_… id, or several separated by commas.

Lengthlength <= 4096
account_type?string

Anything but WHATSAPP answers no items.

Lengthlength <= 20
unread?string

true: only chats with unread messages (unread_count above 0). false or absent: every chat.

Value in

  • "true"
  • "false"
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?account_id=wa_Xk2pQ9rT4vW8yZ1a"
{  "object": "ChatList",  "items": [    {      "object": "Chat",      "id": "wac_k3J9sLq2Vx8nB4mR",      "account_id": "wa_Xk2pQ9rT4vW8yZ1a",      "account_type": "WHATSAPP",      "provider_id": "33612345678@s.whatsapp.net",      "attendee_provider_id": "33612345678@s.whatsapp.net",      "name": "Jane Doe",      "type": 0,      "timestamp": "2026-10-31T09:30:00.000Z",      "unread_count": 1,      "archived": 0,      "muted_until": null,      "read_only": 0,      "disabledFeatures": [],      "folder": [        "INBOX"      ],      "pinned": 0    }  ],  "cursor": null}