Campaign Management
Campaigns let you send a message to an entire contact list in a single operation. The API supports SMS, RCS, and WhatsApp campaigns with scheduling, cost estimation, and delivery statistics.
Campaign lifecycle
Every campaign goes through these stages:
1. Create a campaign (Draft)
POST /campaigns
Provide the channel (SMS, RCS, or WhatsApp), message content, and target contact list. The campaign starts in Draft status.
2. Configure the message
Update the campaign with PUT /campaigns/{id} to refine the message content, select a different template, or change the target audience.
3. Estimate the cost
POST /campaigns/{id}/calculateGoal
Before committing, calculate the expected credit usage. The API returns the total price based on the number of recipients and the channel rates.
You can also check the price at any time with:
GET /campaigns/{id}/price
4. Confirm or schedule
PUT /campaigns/{id}/confirm
- Send immediately: The campaign starts sending right away.
- Schedule: Provide a future date/time to send the campaign later.
5. Monitor delivery
Track your campaign's progress:
GET /campaigns/{id}-- Campaign details including delivery counts.GET /campaigns/stats-- Aggregated statistics across campaigns (filter by date range and channel).
Managing campaigns
| Action | Endpoint |
|---|---|
| List all campaigns | GET /campaigns |
| Get campaign details | GET /campaigns/{id} |
| Create a campaign | POST /campaigns |
| Update a campaign | PUT /campaigns/{id} |
| Calculate cost | POST /campaigns/{id}/calculateGoal |
| Get price | GET /campaigns/{id}/price |
| Confirm / schedule | PUT /campaigns/{id}/confirm |
| Delete a campaign | DELETE /campaigns/{id} |
| Get statistics | GET /campaigns/stats |
Tips
- Always estimate cost before confirming. This helps avoid unexpected credit deductions.
- Use contact lists to segment your audience. You can create and manage lists via the Contacts and Lists guide.
- Check delivery stats after sending to understand engagement and troubleshoot failed deliveries.
See the Campaigns API Reference for full endpoint documentation.