Whats91
Developers

Failure analytics grouped by error and template/source.

Failure Analytics

Summary

Failure analytics grouped by error and template/source.

Prerequisites

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

Endpoint: GET /api/v2/reports/analytics/failures. Failed message report grouped by error and template/source.

GET/api/v2/reports/analytics/failures
ParameterTypeRequiredDescription
senderIdstringOptionalWhatsApp sender phone number.
dateFromstringOptionalYYYY-MM-DD start date.
dateTostringOptionalYYYY-MM-DD end date.
storagestringOptionallive or archive.
templateNamestringOptionalTemplate name filter.
sourceTypestringOptionalSource type filter.
Get failure analytics
curl "https://graph.whats91.com/api/v2/reports/analytics/failures?dateFrom=2026-06-01&dateTo=2026-06-05" \
  -H "Authorization: Bearer w91_live_xxx"
Failure analytics response
{
  "success": true,
  "data": {
    "failures": [
      {
        "error": "Message undeliverable",
        "templateName": "payment_reminder",
        "sourceType": "CAMPAIGN",
        "count": 5
      }
    ]
  }
}

SDK Examples

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

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

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

Related APIs