Rasel / Docs
EN
GET/api/v2/whatsapp-web/chats

List WhatsApp Web chats

Lists chats for a session you own. Each item includes a ready conversationContext. Use type=group for native WhatsApp groups. Hits the live WhatsApp Web provider — keep limit low (max 50).

When to use it. To copy chatId and conversationContext into POST /api/v2/messages/send.

Code example

Correct: Session groups

curl --location 'https://raselsms.com/api/v2/whatsapp-web/chats' \--header 'X-API-Key: YOUR_API_KEY'

Incorrect: Incorrect: missing accountId

curl --location 'https://raselsms.com/api/v2/whatsapp-web/chats' \--header 'X-API-Key: YOUR_API_KEY'

accountId is required.

Response example

200 — Session groups

{  "success": true,  "data": {    "accountId": "session-user-whatsapp-1",    "chats": [      {        "accountId": "session-user-whatsapp-1",        "chatId": "120363012345678901@g.us",        "kind": "group",        "title": "Support group",        "phoneNumber": null,        "conversationKey": "whatsapp_web:session-user-whatsapp-1:120363012345678901@g.us",        "conversationContext": {          "moduleType": "whatsapp_web",          "accountId": "session-user-whatsapp-1",          "chatId": "120363012345678901@g.us"        }      }    ],    "nextCursor": null,    "hasMore": false  }}

400 — Incorrect: missing accountId

{  "success": false,  "code": "VALIDATION_ERROR",  "error": "accountId is required"}

accountId is required.

401 — Missing or invalid API key.

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "UNAUTHORIZED",  "error": "Missing or invalid API key"}

403 — Phone is not verified or the key lacks permission (usually messages:create or api_keys:read).

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "FORBIDDEN",  "error": "Phone not verified or missing permission"}

429 — Rate limit exceeded. Honor Retry-After when present.

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "RATE_LIMITED",  "error": "Rate limit exceeded",  "retryAfterSeconds": 30}

HTTP request

GET /api/v2/whatsapp-web/chats

Request Headers

HeaderTypeDescription
X-API-KeystringYour Rasel API key. Send it on every documented request except inbound webhooks. *

Query parameters

FieldTypeDescription
accountIdstringWhatsApp Web session name, or Telegram bot id used as conversationContext.accountId. *
typeall | direct | groupFilter value. On chats: all, direct, or group. On wallet movements: credit or debit.
limitintegerPage size. Typical range is 1-50 for conversation context and 1-500 for account lists.
cursorstringOpaque pagination cursor from the previous response.

Response Fields

FieldTypeDescriptionExample
successbooleanTrue when the operation succeeded, or when at least one batch recipient succeeded.
datajsonPrimary payload for list and snapshot endpoints.

Status Codes

StatusDescription
200Success.
400Invalid request, validation error, or the resource cannot be used in this state.
401Missing or invalid API key.
403Phone not verified, missing permission, or the account cannot perform this action.
404Resource not found for this API key owner.
409Conflict, such as an idempotency key reuse with a different body, or a session that is not ready.
429Rate limit exceeded, or the maximum number of verification attempts was reached.
502The external provider failed to process the request.
503The provider is unavailable or timed out.

Try it

Parameters

WhatsApp Web session name, or Telegram bot id used as conversationContext.accountId.

Filter value. On chats: all, direct, or group. On wallet movements: credit or debit.

Page size. Typical range is 1-50 for conversation context and 1-500 for account lists.

Opaque pagination cursor from the previous response.

Request

GET /api/v2/whatsapp-web/chats?type=all

Response

Send a request to see the response.