API Reference

WhatsApp API

37 endpoints for messaging, broadcasts, contacts, templates, phone numbers, and business profile. One REST API.

Quick Start

  1. 1.
    Get API Key
    Sign up for free and get your API key in seconds.
  2. 2.
    Connect Account
    Use our OAuth flow to connect WhatsApp accounts.
  3. 3.
    Start Posting
    Make API calls to post content to WhatsApp.
Send a WhatsApp Broadcast
JavaScript
// Step 1: Create a broadcast with a WhatsApp template
const broadcast = await fetch('https://zernio.com/api/v1/broadcasts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    profileId: 'prof_123',
    accountId: 'acc_waba123',
    platform: 'whatsapp',
    name: 'Order Confirmations',
    template: {
      name: 'order_confirmation',
      language: 'en',
      components: [{
        type: 'body',
        parameters: [
          { type: 'text', text: 'John' },
          { type: 'text', text: 'ORD-12345' }
        ]
      }]
    }
  })
}).then(r => r.json());

// Step 2: Add recipients by phone number
await fetch(`https://zernio.com/api/v1/broadcasts/${broadcast.broadcast.id}/recipients`, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    phones: ['+1234567890', '+0987654321']
  })
});

// Step 3: Send immediately
const result = await fetch(`https://zernio.com/api/v1/broadcasts/${broadcast.broadcast.id}/send`, {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}).then(r => r.json());
console.log(`Sent: ${result.sent}, Failed: ${result.failed}`);

WhatsApp Endpoints

POST/v1/broadcasts

Create a WhatsApp broadcast campaign with a Meta-approved template

GET/v1/broadcasts

List WhatsApp broadcast campaigns with delivery stats

GET/v1/broadcasts/{id}

Get broadcast details including sent, delivered, and read counts

POST/v1/broadcasts/{id}/recipients

Add WhatsApp recipients by phone number, contact ID, or segment

POST/v1/broadcasts/{id}/send

Send a WhatsApp broadcast campaign immediately

POST/v1/broadcasts/{id}/schedule

Schedule a WhatsApp broadcast for a future time

POST/v1/broadcasts/{id}/cancel

Cancel a scheduled or in-progress WhatsApp broadcast

GET/v1/whatsapp/templates

List all Meta-approved message templates from your WABA

POST/v1/whatsapp/templates

Create a new WhatsApp template (submitted to Meta for approval)

PUT/v1/whatsapp/templates/{name}

Update an existing WhatsApp message template

DELETE/v1/whatsapp/templates/{name}

Delete a WhatsApp message template

GET/v1/contacts

List WhatsApp contacts with filtering by tags, opt-in status, and search

POST/v1/contacts

Create a WhatsApp contact with phone number and tags

PATCH/v1/contacts/{id}

Update a WhatsApp contact (name, tags, opt-in status, custom fields)

DELETE/v1/contacts/{id}

Delete a WhatsApp contact

POST/v1/contacts/bulk

Bulk import up to 1,000 WhatsApp contacts with phone numbers

GET/v1/whatsapp/phone-numbers

List all purchased WhatsApp phone numbers

GET/v1/whatsapp/phone-numbers/available

Search available US numbers for purchase

POST/v1/whatsapp/phone-numbers/purchase

Purchase a WhatsApp-ready phone number

POST/v1/whatsapp/phone-numbers/{id}/verify

Complete phone number verification

GET/v1/whatsapp/business-profile

Get WhatsApp Business profile (about, address, description)

PUT/v1/whatsapp/business-profile

Update WhatsApp Business profile fields

Media Requirements

TypeFormatMax SizeNotes
ImageJPEG, PNG5 MBSupported in template headers and media messages
VideoMP4 (H.264/AAC)16 MBSupported in template headers and media messages
AudioAAC, MP4, MPEG, AMR, OGG16 MBVoice and audio messages
DocumentPDF, DOC, XLS, PPT, etc.100 MBAny common document format supported

Zernio automatically transcodes and optimizes media for WhatsApp's requirements.

API Limits

WhatsApp enforces per-phone-number messaging tiers based on your quality rating (1K, 10K, 100K, unlimited). Zernio handles rate limit errors (131047) with automatic retries and exponential backoff.

Zernio handles all rate limiting automatically. We queue and retry requests as needed.

Features

  • Full WhatsApp API: broadcasts, contacts, templates, phone numbers, and business profile management
  • No Meta developer app or Business Manager required. One-click Embedded Signup
  • Broadcast campaigns: send to 100 recipients per request with per-user template variables
  • Full template CRUD: create, list, update, delete. We track category changes to prevent surprise billing
  • Contact CRM: bulk import, tags, custom fields, subscription tracking, search and segmentation
  • Phone number provisioning: search, purchase, and verify WhatsApp-ready US numbers via API
  • Business profile management: read and update about, description, address, email, websites
  • 24-hour messaging window handled automatically. Clear errors, no silent failures
  • Webhook delivery for incoming messages, delivery status, and read receipts
  • We absorb Meta's breaking changes so your integration keeps working

Response Example

Response
JSON
{
  "success": true,
  "status": "completed",
  "sent": 2,
  "failed": 0,
  "recipientCount": 2
}

Start building with WhatsApp API

Free tier available · No credit card required · 99.97% uptime

SOC 2 CompliantGDPR Compliant