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 message
  • message.sent — Outbound message sent
  • message.delivered — Message delivered
  • message.read — Message read
  • conversation.created — New conversation opened
  • conversation.closed — Conversation closed
  • contact.created — New contact added
  • contact.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 — Success
  • 201 — Created
  • 400 — Bad Request
  • 401 — Unauthorized
  • 403 — Forbidden
  • 404 — Not Found
  • 422 — Validation Error
  • 429 — Rate Limited
  • 500 — Server Error