Campaigns

WhatsApp Campaign API — Bulk Broadcast Messaging

The WhatsApp campaign API lets you send bulk broadcast messages to large audience lists with scheduling, personalization, and built-in analytics. Run product announcements, flash sales, event invitations, and loyalty programs—all through WhatsApp's rich, interactive messaging format.

Use Cases

  • Product launch announcements with images and CTAs
  • Flash sales and limited-time offers
  • Event invitations with date, time, and venue details
  • Customer loyalty program updates and rewards
  • Re-engagement campaigns for dormant users

How Campaigns Work

The WhatsApp bulk messaging API follows a 5-step workflow from template creation to delivery tracking.

  1. Create an approved WhatsApp template for your campaign message
  2. Build an audience list (contacts) in your Dexatel account
  3. Create a campaign referencing the template and audience
  4. Schedule the campaign for immediate or future delivery
  5. Monitor delivery and read rates through the campaign analytics

Campaign Statuses

scheduled

Campaign is queued for future delivery

in_progress

Campaign is actively sending messages

completed

All messages have been dispatched

canceled

Campaign was stopped before completion

Create a Campaign

Endpoint

POST https://api.dexatel.com/v1/campaigns

Request Parameters

name
Type: string
Required: No

Internal campaign name (max 45 characters). Auto-assigned if omitted

channel
Type: string
Required: Yes

Must be whatsapp

from
Type: string
Required: Yes

WhatsApp sender name (unique identifier)

template
Type: string (UUID)
Required: Yes

ID of a COMPLETED WhatsApp template

audience
Type: string (UUID)
Required: Yes

ID of the contact audience list to send to

schedule
Type: string
Required: No

Future datetime for scheduled sending: yyyy-mm-dd hh:mm:ss.
If omitted, sends immediately.

Example — Immediate Campaign

curl -X POST "https://api.dexatel.com/v1/campaigns" \
  -H "X-Dexatel-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "name": "January Flash Sale",
      "channel": "whatsapp",
      "from": "MyBusiness",
      "template": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "audience": "4f6b8d2a-1c3e-5a7f-9b0d-2e4c6a8f0b1d"
    }
  }'

Example — Scheduled Campaign

curl -X POST "https://api.dexatel.com/v1/campaigns" \
  -H "X-Dexatel-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "name": "Product Launch — March 1",
      "channel": "whatsapp",
      "from": "MyBusiness",
      "template": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "audience": "4f6b8d2a-1c3e-5a7f-9b0d-2e4c6a8f0b1d",
      "schedule": "2024-03-01 09:00:00"
    }
  }'

Example Response (201 Created)

{
  "data": {
    "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "name": "Product Launch — March 1",
    "channel": "whatsapp",
    "status": "scheduled",
    "sender": "MyBusiness",
    "template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "audience_id": "4f6b8d2a-1c3e-5a7f-9b0d-2e4c6a8f0b1d",
    "schedule": "2024-03-01 09:00:00",
    "create_date": "2024-02-20 14:00:00"
  }
}

Manage Campaigns

List Campaigns

# All WhatsApp campaigns
GET /v1/campaigns?filter[channel]=WHATSAPP
# Filter by status
GET /v1/campaigns?filter[channel]=WHATSAPP&filter[statuses]=scheduled,in_progress

Get Campaign Details

GET /v1/campaigns/{campaign_id}
curl -X GET "https://api.dexatel.com/v1/campaigns/c3d4e5f6-a7b8-9012-cdef-123456789012" \
  -H "X-Dexatel-Key: YOUR_API_KEY"

Reschedule a Campaign

Only campaigns in scheduled status can have their schedule updated:

curl -X PUT "https://api.dexatel.com/v1/campaigns/c3d4e5f6-a7b8-9012-cdef-123456789012" \
  -H "X-Dexatel-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "schedule": "2024-03-02 10:00:00"
    }
  }'

Delete a Campaign

curl -X DELETE "https://api.dexatel.com/v1/campaigns/c3d4e5f6-a7b8-9012-cdef-123456789012" \
  -H "X-Dexatel-Key: YOUR_API_KEY"

A successful delete returns HTTP 204 with no response body.

Campaign Error Codes

1522

Schedule must be a future datetime — cannot schedule in the past

1601

Campaign not found — the specified campaign ID does not exist

1603

Sender (from) is required

1605

Audience is required

1607

Template is required

1609

Invalid schedule format — use yyyy-mm-dd hh:mm:ss

1614

Campaign already exists with this name

1616

Audience not found, or template ID does not exist for this channel

1617

Audience ID does not exist for this channel

1631

Invalid campaign name — check length and character restrictions