Wamux Logo
Wamux

API Documentation

Everything you need to integrate WhatsApp messaging into your application.

Quick Start

Send your first message
curl -X POST \
  https://api.yoursite.com/api/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "+237XXXXXXXXX", "message": "Hello!"}'

Authentication

All API requests require authentication using a Bearer token. Generate your API key from the dashboard.

Authorization: Bearer your_api_key_here

API Endpoints

Sessions

POST/api/v1/sessions
GET/api/v1/sessions
GET/api/v1/sessions/{id}
GET/api/v1/sessions/{id}/stream
PATCH/api/v1/sessions/{id}
DELETE/api/v1/sessions/{id}

Messages

POST/api/v1/messages
POST/api/v1/messages/media
POST/api/v1/messages/audio
GET/api/v1/messages
GET/api/v1/messages/{id}

API Keys

POST/api/v1/keys
GET/api/v1/keys
DELETE/api/v1/keys/{id}

Send Text Message

Request

POST /api/v1/messages
{
  "to": "+237612345678",
  "message": "Hello from WhatsApp API!"
}

Response (202)

application/json
{
  "id": "uuid",
  "toPhone": "+237612345678",
  "type": "text",
  "status": "pending"
}

Send Image or Video

Request

POST /api/v1/messages/media
{
  "to": "+237612345678",
  "mediaUrl": "https://example.com/image.jpg",
  "mediaType": "image",
  "caption": "Check this out!"
}

Supported Formats

🖼️ ImagesJPEG, PNG, WebP, GIF (16MB)
🎬 VideosMP4, 3GPP, MOV, WebM (64MB)

Send Audio or Voice Note

Request

POST /api/v1/messages/audio
{
  "to": "+237612345678",
  "audioUrl": "https://example.com/voice.ogg",
  "ptt": true
}

PTT (Push to Talk)

ptt: true→ Voice Note 🎙️
ptt: false→ Audio File 🎵

Formats: MP3, OGG, AAC, WAV, Opus (max 16MB)

Session Management

1. Create Session

POST /api/v1/sessions
{ "session_key": "my-session" }

2. Scan QR Code

Connect to the SSE stream to receive QR code updates:

GET /api/v1/sessions/{id}/stream
Events: qr, connected, error

3. Send Messages

Once connected, you can send messages using the Messages endpoints.

Rate Limits

PlanSessionsMessages/day
Free10100
ProUnlimited10,000

Error Codes

401 UnauthorizedInvalid or missing API key
404 Not FoundSession or resource not found
409 ConflictSession not connected
429 Too Many RequestsRate limit exceeded

Ready to get started?

Create your free account and start sending WhatsApp messages in minutes.

Create Free Account