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
| Header | Type | Description |
|---|---|---|
| X-API-Key | string | Your Rasel API key. Send it on every documented request except inbound webhooks. * |
Query parameters
| Field | Type | Description |
|---|---|---|
| accountId | string | WhatsApp Web session name, or Telegram bot id used as conversationContext.accountId. * |
| type | all | direct | group | Filter value. On chats: all, direct, or group. On wallet movements: credit or debit. |
| limit | integer | Page size. Typical range is 1-50 for conversation context and 1-500 for account lists. |
| cursor | string | Opaque pagination cursor from the previous response. |
Response Fields
| Field | Type | Description | Example |
|---|---|---|---|
| success | boolean | True when the operation succeeded, or when at least one batch recipient succeeded. | |
| data | json | Primary payload for list and snapshot endpoints. |
Status Codes
| Status | Description |
|---|---|
| 200 | Success. |
| 400 | Invalid request, validation error, or the resource cannot be used in this state. |
| 401 | Missing or invalid API key. |
| 403 | Phone not verified, missing permission, or the account cannot perform this action. |
| 404 | Resource not found for this API key owner. |
| 409 | Conflict, such as an idempotency key reuse with a different body, or a session that is not ready. |
| 429 | Rate limit exceeded, or the maximum number of verification attempts was reached. |
| 502 | The external provider failed to process the request. |
| 503 | The provider is unavailable or timed out. |
| 413 | Request 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=allResponse
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 }}