Interactive Documentation
Generates a QR code or connection status for a specific instance.
{instance}/instance/connect/{instanceName}
{
"status": "qrCode",
"qrCode": "base64-encoded-qr-image-data",
"message": "Scan the QR code to connect."
}
Restarts a running instance without losing session data.
{instance}/instances/restart/{instanceName}
{
"message": "Instance restart initiated successfully.",
"instanceName": "main_bot"
}
Checks the current connection status of a specific instance.
{instance}/connection-state/{instanceName}
{
"status": "connected",
"user": "98912XXXXXXX@c.us",
"connection_id": "abc-123-def"
}
Logs out the WhatsApp session for a specific instance.
{instance}/instances/logout/{instanceName}
{
"message": "Instance logged out and session destroyed."
}
Completely deletes an instance and all its associated files.
{instance}/instances/{instanceName}
{
"message": "Instance 'test_env' deleted successfully."
}
Sets the instance presence (e.g., 'composing', 'recording', or 'available').
{instance}/set-presence
{
"instanceName": "main_bot",
"chatId": "98912XXXXXXX@c.us",
"type": "composing"
}
{
"message": "Presence set to composing for chat 98912XXXXXXX@c.us"
}
Configures the URL where incoming events will be sent.
{instance}/webhook/set
{
"instanceName": "main_bot",
"webhookUrl": "https://yourserver.com/api/webhook",
"enabled": true
}
{
"message": "Webhook set successfully."
}
Retrieves the current webhook configuration for an instance.
{instance}/webhook/find/{instanceName}
{
"instanceName": "main_bot",
"webhookUrl": "https://yourserver.com/api/webhook",
"enabled": true
}
Updates specific configuration settings for an instance.
{instance}/settings/set
{
"instanceName": "main_bot",
"autoReply": false,
"rejectCall": true
}
{
"message": "Settings updated."
}
Retrieves the current settings for an instance.
{instance}/settings/find/{instanceName}
{
"instanceName": "main_bot",
"autoReply": false,
"rejectCall": true,
"welcomeMessage": "Hi, how can I help you?"
}
Sends a simple text message to a specific number.
{instance}/messages/send-text
{
"instanceName": "main_bot",
"number": "98912XXXXXXX",
"textMessage": "Hello from API!"
}
{
"status": "success",
"id": "false_98912XXXXXXX@c.us_A12B3C4D5E",
"message": "Message sent."
}
Sends a media file (image, video, document) via URL or Base64.
{instance}/messages/send-media
{
"instanceName": "main_bot",
"number": "98912XXXXXXX",
"mediaUrl": "https://example.com/image.jpg",
"caption": "Check out this image!"
}
{
"status": "success",
"id": "false_98912XXXXXXX@c.us_A12B3C4D5E",
"message": "Media sent."
}
Verifies if a given number is registered on WhatsApp.
{instance}/chat/is-whatsapp
{
"instanceName": "main_bot",
"number": "98912XXXXXXX"
}
{
"status": 200,
"isRegistered": true,
"number": "98912XXXXXXX@c.us"
}