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

Asks the phone for older messages; they arrive later. Poll: SYNC_STARTED, SYNC_RUNNING, then SYNC_DONE once.

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

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/whatsapp/api/v1/chats/wac_k3J9sLq2Vx8nB4mR/sync?account_id=wa_Xk2pQ9rT4vW8yZ1a"
{  "object": "ChatHistorySync",  "chat_id": "wac_k3J9sLq2Vx8nB4mR",  "status": "SYNC_STARTED"}