Auto
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 --request GET 'https://raselsms.com/api/v2/whatsapp-web/chats?accountId=session-user-whatsapp-1&type=group&limit=20' \--header 'X-API-Key: YOUR_API_KEY'

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  }}

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.
413Request body exceeds the size limit.

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

Example response

{  "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  }}