Sessions
Create Session
Create a new WhatsApp session.
Endpoint
Create a new WhatsApp session.
Request
POST /sessionsAuthentication
Every request must include a Bearer token in the Authorization header. Missing or invalid API keys return 401 Unauthorized.
Header
Authorization: Bearer YOUR_API_KEYRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| sessionName | string | Yes | Session name |
| phoneNumber | string | Yes | Phone number including country code |
| enableAccountProtection | boolean | No | Default false |
| enableMessageLogging | boolean | No | Default false |
| enableWebhook | boolean | No | Default false |
| webhookUrl | string | No | Used when enableWebhook is true |
Response
| Field | Type | Description |
|---|---|---|
| uniqueSessionId | string | Session unique identifier |
| sessionName | string | Human-readable session name |
| phoneNumber | string | Associated phone number |
| status | string | Current status: STARTING, CONNECTED, STOPPED, QR_REQUIRED, or ERROR |
| createdAt | string | ISO 8601 creation timestamp |
| updatedAt | string | ISO 8601 last-update timestamp |
Examples
cURL
curl -X POST "https://api.example.com/sessions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionName": "Sales Primary",
"phoneNumber": "+6281224560101",
"enableAccountProtection": true,
"enableMessageLogging": true,
"enableWebhook": false
}'Response
{
"uniqueSessionId": "a1b2c3d4-...",
"sessionName": "Sales Primary",
"phoneNumber": "+6281224560101",
"status": "STARTING",
"createdAt": "2026-04-15T09:00:00.000Z",
"updatedAt": "2026-04-15T09:00:00.000Z"
}