POST /instance/create
Create a new WhatsApp instance with support for multiple integrations including Baileys, WhatsApp Business API, webhooks, event systems, and chatbot platforms.Authentication
This endpoint requires authentication via theapikey header.
Request Body
Unique name for your instance. This identifier is used across all API calls.
Custom authentication token for this instance. If not provided, a token will be auto-generated.
WhatsApp number in international format (e.g.,
5511999999999). Required for WhatsApp Business API integration.WhatsApp Business Account ID. Required for WhatsApp Business API integration.
Generate QR code immediately after instance creation for Baileys integration.
WhatsApp integration type. Available options:
WHATSAPP-BAILEYS- WhatsApp Web integrationWHATSAPP-BUSINESS- Official WhatsApp Business API
Settings
Automatically reject incoming calls.
Message to send when rejecting a call. Requires
rejectCall to be enabled.Ignore messages from groups.
Keep WhatsApp status always online.
Automatically mark messages as read.
Automatically read status updates.
Sync full message history when connecting.
Webhook Configuration
URL to receive webhook events.
Send webhooks grouped by event type.
Include media files as base64 in webhook payload.
Array of event types to receive. Available events:
QRCODE_UPDATEDMESSAGES_UPSERTMESSAGES_UPDATEMESSAGES_DELETESEND_MESSAGECONNECTION_UPDATECALLAnd more…
Proxy Configuration
Proxy server hostname or IP address.
Proxy server port.
Proxy protocol:
http or https.Proxy authentication username (optional).
Proxy authentication password (optional).
Event System Integration
Enable RabbitMQ event publishing.
Array of events to publish to RabbitMQ.
Enable AWS SQS event publishing.
Array of events to publish to SQS.
Enable NATS event publishing.
Array of events to publish to NATS.
Chatwoot Integration
Chatwoot account ID.
Chatwoot access token.
Chatwoot instance URL.
Sign messages with agent name in Chatwoot.
Automatically reopen conversations.
Set new conversations as pending.
Import contacts to Chatwoot.
Import message history to Chatwoot.
Number of days to import messages from history.
Merge Brazilian contacts (removes 9th digit).
Custom inbox name in Chatwoot. Defaults to instance name.
Response
Instance information
Name of the created instance
Unique instance identifier (UUID)
Integration type used
Connection status:
open, close, connectingWebhook URL for WhatsApp Business (if applicable)
Access token for WhatsApp Business webhook (if applicable)
Authentication token for this instance. Use this in the
apikey header for instance-specific operations.Examples
Response Example
Success Response
Error Response
Important: Save the
hash value from the response. You’ll need it as your apikey for all subsequent API calls related to this instance.Error Handling
The API returns standard HTTP status codes:201- Instance created successfully400- Bad request (validation error)401- Unauthorized (invalid API key)500- Internal server error
- Missing instanceName: The
instanceNamefield is required - Invalid integration: Unknown integration type specified
- Invalid proxy: Proxy configuration test failed
- Chatwoot validation: Missing required Chatwoot fields when partial config provided
- Business API requirements: Missing
numberfield for WhatsApp Business integration