List campaign summaries and delivery totals.
Campaign Reports
Summary
List campaign summaries and delivery totals.
Prerequisites
- Authorization: Bearer w91_live_xxx
- Content-Type: application/json for JSON requests
Related documentation
Endpoint: GET /api/v2/reports/campaigns. Returns campaign summaries with delivery counts.
GET
/api/v2/reports/campaigns| Parameter | Type | Required | Description |
|---|---|---|---|
senderId | string | Optional | WhatsApp sender phone number. |
page | number | Optional | Positive integer. Default 1. |
limit | number | Optional | Positive integer. Default 50, max 200. |
dateFrom | string | Optional | YYYY-MM-DD start date. |
dateTo | string | Optional | YYYY-MM-DD end date. |
status | string | Optional | Campaign status filter. |
List campaigns
curl "https://graph.whats91.com/api/v2/reports/campaigns?limit=50" \
-H "Authorization: Bearer w91_live_xxx"Campaign list response
{
"success": true,
"data": {
"totals": {
"campaigns": 1,
"recipients": 100,
"sent": 90,
"delivered": 80,
"read": 55,
"failed": 5,
"pending": 5
},
"campaigns": [
{
"campaignUid": "campaign_uid",
"name": "Payment follow up",
"status": "COMPLETED",
"summary": {
"recipients": 100,
"sent": 90,
"delivered": 80,
"read": 55,
"failed": 5,
"pending": 5
}
}
]
}
}SDK Examples
Use these examples as starting points for server-side implementations.
cURL
curl -X GET "https://graph.whats91.com/api/v2/reports/campaigns" \
-H "Authorization: Bearer w91_live_xxx"Node.js
const response = await fetch("https://graph.whats91.com/api/v2/reports/campaigns", {
method: "GET",
headers: {
"Authorization": "Bearer w91_live_xxx",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);PHP
$ch = curl_init("https://graph.whats91.com/api/v2/reports/campaigns");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer w91_live_xxx",
"Content-Type: application/json"
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Python
import requests
response = requests.request(
"GET",
"https://graph.whats91.com/api/v2/reports/campaigns",
headers={
"Authorization": "Bearer w91_live_xxx",
"Content-Type": "application/json",
}
)
print(response.json())C#
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer w91_live_xxx");
var request = new HttpRequestMessage(HttpMethod.Get, "https://graph.whats91.com/api/v2/reports/campaigns");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Related APIs
Reports
List message reports with pagination, date filters, status filters, and sender scoping.
Message Status
Retrieve the latest status and lifecycle events for one message.
Mobile History
List message history for one recipient mobile number.
Campaign Detail
Retrieve one campaign summary with totals and breakdowns.