What's new, 7 November 2026: WASync Chat notifies you on your phone, even when the app is closed.
WASync · Developers

List recent messages

Returns recent messages (newest first) scoped to the token's connections. Cursor-paginated. Every message carries a `sender` object: `{ "type": "customer" }` for incoming messages, and `{ type, userId, name }` for outgoing ones — who on your side sent it (an employee, a Chat Flow, the AI step, a robot, the API, the phone…). Use the filters to pull exactly the slice a BI tool needs, e.g. `?direction=out&from=2026-11-01&to=2026-11-30&senderUserId=17`. Filters only narrow the token's scope, never widen it.

GET
/messages

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

Every message carries a sender object: { "type": "customer" } for incoming messages, and { type, userId, name } for outgoing ones — who on your side sent it (an employee, a Chat Flow, the AI step, a robot, the API, the phone…). Use the filters to pull exactly the slice a BI tool needs, e.g. ?direction=out&from=2026-11-01&to=2026-11-30&senderUserId=17. Filters only narrow the token's scope, never widen it.

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.

direction?string

in = incoming messages only, out = outgoing only. Anything else → 400 invalid_direction.

Value in

  • "in"
  • "out"
from?string

Lower bound on createdAt (inclusive). YYYY-MM-DD = from that UTC midnight, or an ISO 8601 date-time WITH a zone (2026-11-01T08:00:00+02:00, …Z). Invalid → 400 invalid_date.

to?string

Upper bound on createdAt. YYYY-MM-DD INCLUDES that whole UTC day; a date-time with a zone is exclusive. to not after from → 400 invalid_date_range.

senderUserId?string

Only outgoing messages sent by this employee (the sender.userId value — a Bitrix24 user id). Invalid characters → 400 invalid_sender_user_id.

hasTranscript?boolean

true = only voice notes whose transcript is done (transcript.status = done). false or absent = no filter. Anything else → 400 invalid_has_transcript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/messages?from=2026-11-01&to=2026-11-30&senderUserId=17&hasTranscript=true"
{  "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",      "sender": {        "type": "customer",        "userId": "17",        "name": "Ana Pop"      },      "transcript": {        "status": "done",        "text": "Hola, quería saber si tienen cita el jueves."      }    }  ],  "nextCursor": "string",  "hasMore": true}
Was this page helpful?