Create Instance
Create a new WhatsApp instance with a phone number, name, and optional webhook URL for receiving events.
Rate Limit
This endpoint is limited to 5 requests per minute to prevent abuse.Request Body
phone(required) - Phone number in E.164 format (e.g., +201234567890)name(required) - Instance name (max 50 characters, must be unique per user per service)webhook_url(optional) - HTTPS webhook URL to receive WhatsApp events
Response
Upon successful creation, you’ll receive:- Instance details (id, name, phone, service_type, status)
qr_code- Base64-encoded PNG QR code for WhatsApp authenticationaccess_token- Bearer token for authenticating API requestscreated_at- Creation timestamp
QR Code Display
The QR code is returned as a base64-encoded PNG without the data URI prefix. To display it in HTML:Next Steps
After creating the instance:- Display the QR code to the user
- Open WhatsApp on the mobile device
- Go to Settings > Linked Devices
- Scan the QR code
- Wait for the instance status to change to
WORKING
Validation Errors
Common validation errors (422 status):- Missing
phoneornamefield - Invalid phone number format
- Instance name already exists
- Invalid webhook URL (must be HTTPS)
- Name exceeds 50 characters
Authorizations
Bearer token authentication. Example: Bearer 234|3uB2pBST2H6If8twXIeUaeNu23VJ8XassYoOVJuva48388e1
Headers
application/json
"application/json"
application/json
"application/json"
Body
E.164 format phone number (e.g. +201234567890)
"+201234567890"
Instance name (max 50 characters, must be unique per user per service)
50"MyInstanceName"
Optional webhook URL (must be a valid https URL)
"https://yourdomain.com/webhooks/whatsapp"
Response
Instance created successfully
Instance UUID
"fa3d01c4-1234-4c0d-a12f-df319b612f8c"
Instance name
"MyInstanceName"
Phone number in E.164 format
"+201234567890"
Service type
"whatsapp"
Instance status
STOPPED, STARTING, WORKING, SCAN_QR_CODE, FAILED, PENDING "WORKING"
Access token for the instance
"234|3uB2pBST2H6If8twXIeUaeNu23VJ8XassYoOVJuva48388e1"
Creation timestamp
"2025-05-26T10:12:45"
Base64-encoded PNG QR code (without data:image/png;base64, prefix). You must prepend it manually when displaying: [Image blocked: No description]
"iVBORw0KGgoAAAANSUhEUgAAA..."