WazoneIndia REST API
Manage multiple WhatsApp client sessions and dispatch rich interactive messaging types including lists, reply buttons, carousels, and polls.
⚡ Dynamic Playground Helper
API Key:
-
API Token:
-
🔒 Authentication & API Credentials
Each WhatsApp session has its own unique, deterministic credentials that are displayed in the Device Manager dashboard card.
Pass your credentials via one of the following methods:
- Header:
x-api-key: wz_key_xxxxorAuthorization: Bearer wz_key_xxxx - Query parameter:
?apiKey=wz_key_xxxxor?token=wz_tok_xxxx
Backward Compatibility Note: Authorization checks are graceful; if credentials are not supplied, the request is allowed (with a console warning) to avoid breaking local service scripts.
GET
/api/sessions
List all configured WhatsApp sessions
Request Headers
| Header | Required | Description |
|---|---|---|
| x-api-key | No | Your API Key or Token (graceful bypass if missing) |
Copy cURL Command
cURL
Response (200 Success)
JSON
{
"success": true,
"sessions": [
{
"sessionId": "default",
"connected": true,
"status": "connected",
"qrAvailable": false,
"pairingCode": null,
"apiKey": "wz_key_9a8b...",
"apiToken": "wz_tok_f8d7...",
"phoneNumber": "919843350000",
"jid": "919843350000@s.whatsapp.net",
"pushName": "Admin Panel",
"platform": "smba"
}
],
"total": 1
}
POST
/api/connect-qr
Initialize a session and generate a QR code
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | Unique identifier for the WhatsApp session to create/start |
Copy cURL Command
cURL
Response (200 Success)
JSON
{
"success": true,
"connected": false,
"qr": "2@...",
"qrDataUrl": "data:image/png;base64,...",
"message": "QR code ready"
}
GET
/api/qr/:sessionId
Retrieve the current QR authentication state
Copy cURL Command
cURL
POST
/api/connect
Link WhatsApp via an 8-character pairing code
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | Unique identifier for the session |
| phoneNumberRequired | string | Mobile number including country code (e.g. "919843350000") |
Copy cURL Command
cURL
Response (200 Success)
JSON
{
"success": true,
"message": "Open WhatsApp -> Linked Devices -> Link with phone number and enter pairing code",
"pairingCode": "ABC123XY",
"phoneNumber": "919843350000"
}
GET
/api/check-status/:sessionId
Fetch connection details and status
Copy cURL Command
cURL
POST
/api/send (Text)
Send a plain text message
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | ID of the sending device session |
| numberRequired | string | Recipient phone number (e.g. "919843350000" or group JID) |
| typeRequired | string | Set this to "text" |
| messageRequired | string | Text content of the message |
Copy cURL Command
cURL
Response (200 Success)
JSON
{
"success": true,
"message": "Message sent successfully",
"messageId": "3EB04D368C1C"
}
POST
/api/send (Media)
Send image messages with captions
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | Sending session ID |
| numberRequired | string | Recipient phone number |
| typeRequired | string | Set this to "image" |
| mediaUrlRequired | string | Public direct link to image asset |
| message | string | Caption text below the media |
Copy cURL Command
cURL
POST
/api/send (Document)
Send document files (PDF, DOCX, ZIP, etc.)
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | Sending session ID |
| numberRequired | string | Recipient phone number |
| typeRequired | string | Set this to "document" |
| mediaUrlRequired | string | Public direct link to the document |
| message | string | Optional caption text |
| fileName | string | The name displayed for the file (e.g. "Invoice.pdf") |
| mimetype | string | Mime type of document (defaults to "application/octet-stream") |
Copy cURL Command
cURL
POST
/api/send (Buttons)
Send quick reply or call-to-action buttons
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | Sending session ID |
| numberRequired | string | Recipient phone number |
| typeRequired | string | Set this to "button" |
| optionsRequired | object | Button settings containing text, footer, and buttons array |
Copy cURL Command
cURL
POST
/api/send (List)
Send interactive select menus (List Messages)
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | Sending session ID |
| numberRequired | string | Recipient phone |
| typeRequired | string | Set to "list" |
| optionsRequired | object | List data: title, text, footer, buttonText, and sections |
Copy cURL Command
cURL
POST
/api/send (Poll)
Send WhatsApp interactive polls
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | Sending session ID |
| numberRequired | string | Recipient JID / number |
| typeRequired | string | Set to "poll" |
| optionsRequired | object | Poll options: name (question) and values (options array) |
Copy cURL Command
cURL
POST
/api/send (Carousel)
Send interactive card decks (Carousel Messages)
JSON Body Parameters
| Field | Type | Description |
|---|---|---|
| sessionIdRequired | string | Sending session ID |
| numberRequired | string | Recipient phone |
| typeRequired | string | Set to "carousel" |
| optionsRequired | object | Carousel settings containing cards array (with images, text, buttons) |
Copy cURL Command
cURL
GET
/api/devices/:sessionId
Query active linked client devices from WhatsApp servers
Copy cURL Command
cURL
GET
/api/groups/:sessionId
Fetch JIDs and metadata for joined groups
Copy cURL Command
cURL
POST
/api/disconnect
Disconnect socket link without logging out
Copy cURL Command
cURL
POST
/api/reconnect
Trigger socket reconnection
Copy cURL Command
cURL
POST
/api/remove-session
Disconnect session and delete credential files
Copy cURL Command
cURL
POST
/api/logout
Perform full logout (de-authorizes instance on WhatsApp)
Copy cURL Command
cURL