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
string
required
Unique name for your instance. This identifier is used across all API calls.
string
Custom authentication token for this instance. If not provided, a token will be auto-generated.
string
WhatsApp number in international format (e.g.,
5511999999999). Required for WhatsApp Business API integration.string
WhatsApp Business Account ID. Required for WhatsApp Business API integration.
boolean
default:"false"
Generate QR code immediately after instance creation for Baileys integration.
string
WhatsApp integration type. Available options:
WHATSAPP-BAILEYS- WhatsApp Web integrationWHATSAPP-BUSINESS- Official WhatsApp Business API
Settings
boolean
default:"false"
Automatically reject incoming calls.
string
Message to send when rejecting a call. Requires
rejectCall to be enabled.boolean
default:"false"
Ignore messages from groups.
boolean
default:"false"
Keep WhatsApp status always online.
boolean
default:"false"
Automatically mark messages as read.
boolean
default:"false"
Automatically read status updates.
boolean
default:"false"
Sync full message history when connecting.
Webhook Configuration
string
URL to receive webhook events.
boolean
default:"false"
Send webhooks grouped by event type.
boolean
default:"true"
Include media files as base64 in webhook payload.
array
Array of event types to receive. Available events:
QRCODE_UPDATEDMESSAGES_UPSERTMESSAGES_UPDATEMESSAGES_DELETESEND_MESSAGECONNECTION_UPDATECALLAnd more…
Proxy Configuration
string
Proxy server hostname or IP address.
string
Proxy server port.
string
Proxy protocol:
http or https.string
Proxy authentication username (optional).
string
Proxy authentication password (optional).
Event System Integration
boolean
default:"false"
Enable RabbitMQ event publishing.
array
Array of events to publish to RabbitMQ.
boolean
default:"false"
Enable AWS SQS event publishing.
array
Array of events to publish to SQS.
boolean
default:"false"
Enable NATS event publishing.
array
Array of events to publish to NATS.
Chatwoot Integration
string
Chatwoot account ID.
string
Chatwoot access token.
string
Chatwoot instance URL.
boolean
Sign messages with agent name in Chatwoot.
boolean
Automatically reopen conversations.
boolean
Set new conversations as pending.
boolean
default:"true"
Import contacts to Chatwoot.
boolean
default:"true"
Import message history to Chatwoot.
number
default:"60"
Number of days to import messages from history.
boolean
default:"false"
Merge Brazilian contacts (removes 9th digit).
string
Custom inbox name in Chatwoot. Defaults to instance name.
Response
object
string
Authentication token for this instance. Use this in the
apikey header for instance-specific operations.object
object
object
object
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