API Reference
Authentication
All API requests require a Bearer token. Generate API keys from Dashboard → Settings → API Keys.
Authorization: Bearer {api_key}
Base URL
https://your-domain.com/api/v1
Endpoints
Contacts
List Contacts
GET /api/v1/contacts
Query parameters: page, per_page, search, tag
Create Contact
POST /api/v1/contacts
{
"name": "John Doe",
"phone": "+1234567890",
"email": "john@example.com",
"tags": ["customer", "vip"],
"custom_fields": {"company": "Acme Inc"}
}
Get Contact
GET /api/v1/contacts/{id}
Update Contact
PUT /api/v1/contacts/{id}
Delete Contact
DELETE /api/v1/contacts/{id}
Messages
Send Message
POST /api/v1/messages/send
{
"to": "+1234567890",
"whatsapp_account_id": 1,
"type": "text",
"content": {
"body": "Hello from the API!"
}
}
Send Template Message
POST /api/v1/messages/send
{
"to": "+1234567890",
"whatsapp_account_id": 1,
"type": "template",
"content": {
"name": "hello_world",
"language": "en",
"components": []
}
}
Conversations
List Conversations
GET /api/v1/conversations
Query parameters: status (open/closed/pending), assigned_to, page
Get Conversation
GET /api/v1/conversations/{id}
Includes messages.
Campaigns
List Campaigns
GET /api/v1/campaigns
Create Campaign
POST /api/v1/campaigns
{
"name": "Welcome Campaign",
"whatsapp_account_id": 1,
"template_name": "welcome_message",
"segment_id": 1,
"scheduled_at": "2026-03-15T10:00:00Z"
}
Webhooks (Outgoing)
List Webhooks
GET /api/v1/webhooks
Create Webhook
POST /api/v1/webhooks
{
"url": "https://your-server.com/webhook",
"events": ["message.received", "message.sent", "conversation.created"],
"secret": "your_webhook_secret"
}
Webhook Events (Outgoing)
When events occur, Wazera sends POST requests to your webhook URLs with HMAC-SHA256 signatures.
Headers
X-Wazera-Signature: sha256=...
Content-Type: application/json
Event Types
message.received— New inbound messagemessage.sent— Outbound message sentmessage.delivered— Message deliveredmessage.read— Message readconversation.created— New conversation openedconversation.closed— Conversation closedcontact.created— New contact addedcontact.updated— Contact updated
Rate Limits
Rate limits depend on your plan:
- Starter: 100 requests/minute
- Professional: 500 requests/minute
- Enterprise: 2000 requests/minute
Error Responses
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The phone field is required.",
"details": {}
}
}
HTTP Status Codes:
200— Success201— Created400— Bad Request401— Unauthorized403— Forbidden404— Not Found422— Validation Error429— Rate Limited500— Server Error