-
Notifications
You must be signed in to change notification settings - Fork 0
Multi Instance Configuration
Aziel edited this page Dec 16, 2025
·
2 revisions
AZ-WAP supports managing multiple WhatsApp sessions in a single server deployment. Each instance is identified by a unique token.
POST /instances
Content-Type: application/json
{
"name": "my-sales-bot"
}Response:
{
"id": "abc123",
"name": "my-sales-bot",
"token": "your-secret-token",
"status": "CREATED"
}
⚠️ Important: Save thetokenimmediately. It's only shown once at creation time.
All API requests must include the instance token:
# Header method (recommended)
X-Instance-Token: your-secret-token
# Or query parameter
GET /app/login?token=your-secret-token| Status | Description |
|---|---|
CREATED |
Instance created but not connected |
ONLINE |
WhatsApp session active |
OFFLINE |
Disconnected or logged out |
Each instance can be configured independently:
PUT /instances/{id}/webhook
{
"urls": ["https://your-webhook.com/endpoint"],
"secret": "webhook-secret",
"insecure_skip_verify": false
}PUT /instances/{id}/bot
{
"bot_id": "bot-uuid"
}See Chatwoot-Integration for detailed configuration.
Each instance maintains isolated storage:
storages/
├── instances.db # Instance registry
├── wa-{instanceID}.db # WhatsApp session data
└── chat-{instanceID}.db # Chat storage (optional)
- Token Security: Treat tokens like API keys - never expose them in client-side code
- Instance Naming: Use descriptive names for easy identification
- Resource Management: Disconnect unused instances to free resources
-
Monitoring: Check instance status regularly via
GET /instances