Skip to main content

Campaign Stats

Return aggregate per-contact delivery stats for a campaign, covering every lifecycle state (sent, delivered, read, clicked, failed, replied).

GET /api/v1/campaigns/{campaign_id}/stats

Poll this endpoint after calling Send Campaign to track rollout progress, or check stats on completed campaigns for reporting.

Path parameters

ParameterTypeDescription
campaign_idstringCampaign ID returned from Create Campaign

Example request

curl -X GET https://server.waplify.io/api/v1/campaigns/507f1f77bcf86cd799439060/stats \
-H "Authorization: Bearer wapl_your_api_key"

Success response

{
"status": "success",
"campaign_id": "507f1f77bcf86cd799439060",
"name": "Summer Sale Blast",
"campaign_status": "completed",
"total_contacts": 2000,
"sent_count": 1998,
"delivered_count": 1932,
"read_count": 1204,
"clicked_count": 312,
"failed_count": 2,
"replied_count": 41,
"success_count": 1998,
"created_at": "2026-06-15T10:00:00Z",
"scheduled_at": null,
"started_at": "2026-06-15T10:05:00Z",
"completed_at": "2026-06-15T10:45:00Z"
}

Response fields

FieldTypeDescription
campaign_idstringCampaign ID
namestringCampaign name
campaign_statusstringLifecycle: draft, scheduled, running, completed, cancelled, failed
total_contactsnumberTotal contacts targeted
sent_countnumberContacts the message was sent to (WhatsApp accepted)
delivered_countnumberContacts who received the message on their phone
read_countnumberContacts who read the message
clicked_countnumberContacts who clicked a CTA (URL / quick-reply button)
failed_countnumberContacts for whom sending failed
replied_countnumberContacts who replied
success_countnumbertotal_contacts - failed_count (shortcut for "reached the pipeline successfully")
created_atstringWhen the campaign was created
scheduled_atstring|nullScheduled send time (if scheduled)
started_atstring|nullActual send start time
completed_atstring|nullWhen the worker finished dispatching

Funnel interpretation

total_contacts

sent_count ← accepted by WhatsApp

delivered_count ← reached the phone

read_count ← contact opened the message

clicked_count ← contact clicked a button

failed_count counts contacts who dropped out at any point (send rejected, number unreachable, etc.). replied_count counts contacts who sent a reply back — use it with the message.reply webhook for real-time tracking.

Error responses

Campaign not found

// 404 Not Found
{
"error": "not_found",
"message": "Campaign not found"
}

Invalid campaign ID

// 400 Bad Request
{
"error": "bad_request",
"message": "Invalid campaign_id"
}
Polling vs. webhooks

Stats update continuously as the background worker processes contacts. Poll every 30–60 seconds for coarse progress, but use webhooks (message.sent, message.delivered, message.read, message.failed) to react to individual message events in real time.