GET/api/v2/whatsapp-web/sessions
List WhatsApp Web sessions
Sessions linked to your account. Use accountId (session name) in send and chat list calls. System and presence-probe sessions are excluded. No QR or secrets.
When to use it. To get accountId before listing chats or sending.
Code example
Correct: Session list
curl --request GET 'https://raselsms.com/api/v2/whatsapp-web/sessions' \--header 'X-API-Key: YOUR_API_KEY'Response example
200 — Session list
{ "success": true, "data": { "page": 1, "limit": 20, "hasMore": false, "sessions": [ { "accountId": "session-user-whatsapp-1", "displayName": "Sales WhatsApp", "status": "active", "connectionState": "ready", "moduleType": "whatsapp_web" } ] }}HTTP request
GET /api/v2/whatsapp-web/sessions
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 |
|---|---|---|
| page | integer | 1-based page number. Default 1. |
| limit | integer | Page size. Typical range is 1-50 for conversation context and 1-500 for account lists. |
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. |
| 429 | Rate limit exceeded, or the maximum number of verification attempts was reached. |
| 413 | Request body exceeds the size limit. |
Try it
Parameters
1-based page number. Default 1.
Page size. Typical range is 1-50 for conversation context and 1-500 for account lists.
Request
GET /api/v2/whatsapp-web/sessionsResponse
Example response
{ "success": true, "data": { "page": 1, "limit": 20, "hasMore": false, "sessions": [ { "accountId": "session-user-whatsapp-1", "displayName": "Sales WhatsApp", "status": "active", "connectionState": "ready", "moduleType": "whatsapp_web" } ] }}