List recent messages
Returns recent messages (newest first) scoped to the token's connections. Cursor-paginated.
Returns recent messages (newest first) scoped to the token's connections. Cursor-paginated.
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
Limit to a single connection id (must be inside the grant; otherwise an empty page is returned).
Page size.
1 <= value <= 10020Opaque 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}Slot quota and connection health GET
Answers "can I onboard another connection right now?" before you take the order. Everything is scoped to the token's workspace — there is no way to ask about another one. `slots.available` is what `POST /connections` can still consume with an active licence; `slots.nextExpiry` is the date you must renew before, so a slot never expires underneath a customer who already paid. `connections.needsReconnect` counts numbers waiting for their owner to scan a fresh QR (the same state that fires the `connection.disconnected` webhook). **A slot is capacity, not a phone number** and not something you bind to a customer: it attaches when a number actually pairs, and deleting a connection returns its slot to the pool carrying whatever time is left on it, ready for the next number you connect. Map WASync's connection `id` (a stable cuid, echoed by every REST response and by `connection_id` on every webhook) to your own customer record — we mint the id, you map it. Do not try to track slots per customer; track connections.
Send a WhatsApp message (text or media) POST
Sends a message from one of the authorized connections. Supply either `text` (text message) or `media` (image, video, audio, document, voice note) — not both. Pass an `idempotencyKey` on text sends to make retries safe.