Generating an API Key
1. Go to Dashboard β Settings β Developers. 2. Click Create New Key. 3. Give it a descriptive name (e.g. "Zapier Integration", "My Backend"). 4. Copy the key immediately β you cannot view it again after closing the dialog. 5. Store it securely using environment variables in your app. To revoke a key, click the trash icon next to it in the API Keys list.
Send Message API
Endpoint: POST /api/send-message
Authentication: Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Send Text Message:
{
"instanceName": "my-instance",
"remoteJid": "923001234567@s.whatsapp.net",
"type": "sendText",
"message": { "text": "Hello from the API! π" }
}
Send Image:
{
"instanceName": "my-instance",
"remoteJid": "923001234567@s.whatsapp.net",
"type": "sendImage",
"message": {
"imageUrl": "https://yoursite.com/image.jpg",
"caption": "Check this out!"
}
}
Supported type values: sendText, sendImage, sendVideo, sendAudio, sendDocument
Success Response: { "success": true, "messageId": "..." }Incoming Webhooks (Triggers)
Connect external services to your automations using Webhook Triggers: 1. Go to Settings β Connections β Webhooks β Create Endpoint. 2. Select the automation that should be triggered. 3. Enter the phone field path β where in the JSON payload the customer's phone is (e.g. customer.phone for Shopify orders). 4. Set the default country code (e.g. +92 for Pakistan). 5. Copy the Webhook URL and paste it into your external service. Example Shopify Setup: β’ Shopify β Settings β Notifications β Webhooks β Add Webhook. β’ Event: Order Created. β’ URL: your webhook endpoint URL. β’ Format: JSON. Result: New Shopify order β webhook fires β customer gets order confirmation on WhatsApp!