Whats91
Developers

Retrieve one campaign summary with totals and breakdowns.

Campaign Detail

Summary

Retrieve one campaign summary with totals and breakdowns.

Prerequisites

  • Authorization: Bearer w91_live_xxx
  • Content-Type: application/json for JSON requests

Endpoint: GET /api/v2/reports/campaigns/{campaignUid}. Returns campaign summary, totals, status breakdown, and step breakdown.

GET/api/v2/reports/campaigns/{campaignUid}
ParameterTypeRequiredDescription
campaignUidstringRequiredCampaign UID from the campaign list.
senderIdstringOptionalWhatsApp sender phone number.
Get campaign detail
curl "https://graph.whats91.com/api/v2/reports/campaigns/campaign_uid" \
  -H "Authorization: Bearer w91_live_xxx"
Campaign detail response
{
  "success": true,
  "data": {
    "campaignUid": "campaign_uid",
    "summary": {
      "name": "Payment follow up",
      "status": "COMPLETED"
    },
    "totals": {
      "recipients": 100,
      "delivered": 80,
      "read": 55,
      "failed": 5
    },
    "statusBreakdown": [
      { "status": "delivered", "count": 80 },
      { "status": "failed", "count": 5 }
    ],
    "stepBreakdown": [
      { "step": "send", "count": 100 },
      { "step": "status", "count": 90 }
    ]
  }
}
Not found response
{
  "success": false,
  "message": "Campaign not found",
  "error_code": "CAMPAIGN_NOT_FOUND"
}

SDK Examples

Use these examples as starting points for server-side implementations.

cURL
curl -X GET "https://graph.whats91.com/api/v2/reports/campaigns/{campaignUid}" \
  -H "Authorization: Bearer w91_live_xxx"
Node.js
const response = await fetch("https://graph.whats91.com/api/v2/reports/campaigns/{campaignUid}", {
  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/{campaignUid}");
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/{campaignUid}",
    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/{campaignUid}");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());

Related APIs