WASync · Developers
API ReferenceMessages

List recent messages

Returns recent messages (newest first) scoped to the token's connections. Cursor-paginated.

GET
/messages

Returns recent messages (newest first) scoped to the token's connections. Cursor-paginated.

AuthorizationBearer <token>

The default way to authenticate. Create a key at https://developers.wasync.app/keys and send it as Authorization: Bearer wsk_live_….

The key is shown once at creation and stored only as a hash — lose it and you revoke it and create another. Each key carries its own scopes (whatsapp.read, whatsapp.send, whatsapp.events, whatsapp.manage) and an optional IP allowlist.

Errors: an unknown or revoked key returns 401 invalid_key; a key whose IP allowlist does not cover the calling address returns 403 ip_not_allowed (a distinct code on purpose — the key is fine, the address is not). Both carry a WWW-Authenticate: Bearer challenge. Scopes and the connection list are resolved live on every request, so revoking a key or narrowing it takes effect on the next call.

In: header

Query Parameters

connectionId?string

Limit to a single connection id (must be inside the grant; otherwise an empty page is returned).

limit?integer

Page size.

Range1 <= value <= 100
Default20
cursor?string

Opaque pagination cursor from a previous response's nextCursor.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/messages"
{  "messages": [    {      "id": "cmqj3k2ab0001xyz",      "waMessageId": "[email protected]_3EB0A1B2C3",      "connectionId": "string",      "direction": "incoming",      "text": "string",      "mediaUrl": "string",      "mediaType": "string",      "status": "delivered",      "errorMessage": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string",  "hasMore": true}