Skip to main content

07 - API Specification

7.1 Overview

PropertyValue
Base URLhttp://localhost:3001/api
API Versionv1
FormatJSON
AuthBearer Token or X-API-Key header

7.2 Authentication

Bearer Token

Authorization: Bearer YOUR_JWT_TOKEN

API Key

X-API-Key: YOUR_API_KEY

7.3 Response Format

Success Response

{
"success": true,
"data": { ... },
"meta": { "timestamp": "2026-02-05T10:00:00Z" }
}

Error Response

{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Phone number is required"
}
}

7.4 Endpoints

Messages

MethodEndpointDescription
POST/messages/textSend text message
POST/messages/imageSend image
POST/messages/videoSend video
POST/messages/documentSend document
POST/messages/locationSend location
POST/messages/contactSend contact card
POST/messages/pollSend poll

Bulk Messaging

MethodEndpointDescription
POST/bulk/sendSend bulk messages with variables
GET/bulk/batchesList all batches
GET/bulk/batch/:batchIdGet batch status
POST/bulk/batch/:batchId/cancelCancel batch

Groups

MethodEndpointDescription
GET/groups/profile/:profileIdList all groups
GET/groups/:groupIdGet group info
POST/groupsCreate group
PATCH/groups/:groupIdUpdate group
POST/groups/:groupId/participants/addAdd participants
POST/groups/:groupId/participants/removeRemove participants
POST/groups/:groupId/participants/promotePromote to admin
POST/groups/:groupId/participants/demoteDemote from admin
POST/groups/:groupId/leaveLeave group
GET/groups/:groupId/invite-linkGet invite link

Profiles

MethodEndpointDescription
GET/profilesList all profiles
POST/profilesCreate profile
GET/profiles/:idGet profile
DELETE/profiles/:idDelete profile
POST/profiles/:id/connectStart connection
GET/profiles/:id/qrGet QR code
POST/profiles/:id/disconnectDisconnect

Contacts

MethodEndpointDescription
GET/contactsList contacts
POST/contactsCreate contact
GET/contacts/:idGet contact
PATCH/contacts/:idUpdate contact
DELETE/contacts/:idDelete contact
POST/contacts/:id/tagsAdd tags

Webhooks

MethodEndpointDescription
GET/webhooksList webhooks
POST/webhooksCreate webhook
DELETE/webhooks/:idDelete webhook

7.5 Example: Send Bulk with Variables

curl -X POST http://localhost:3001/api/bulk/send \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"profileId": "profile-123",
"messages": [
{
"chatId": "628123456789@c.us",
"type": "text",
"content": { "text": "Hello {name}!" },
"variables": { "name": "John" }
},
{
"chatId": "628987654321@c.us",
"type": "text",
"content": { "text": "Hello {name}!" },
"variables": { "name": "Jane" }
}
],
"options": {
"delayBetweenMessages": 5000,
"randomizeDelay": true
}
}'

← Engine Abstraction · Documentation Index · WebSocket API →