This request returns summary and per-campaign statistics for all WhatsApp campaigns (or filtered campaigns) within a date range. Response contains chart (time-series arrays), summary (aggregated totals with drop/undelivered breakdowns), and details (per-campaign breakdown array).
Endpoint and Headers
POST https://gw.api.insidethekube.com/api/wa/v2/statistics/overall
Headers
Header | Sample Value | Description |
|---|---|---|
Authorization | Bearer {oauth2-token} | This key is required to authorize your request. Refer to Generate an OAuth 2.0 Token for WhatsApp Campaign Analytics API to generate your OAuth 2.0 token. |
Body parameters
Column | Description | Data Type | Required |
|---|---|---|---|
start_time | Start of the date range as a 10-digit Unix timestamp in seconds. | Integer | Yes |
end_time | End of the date range as a 10-digit Unix timestamp. Must be greater than | Integer | Yes |
campaign_filter | Optional filter object. If omitted, all campaigns are included. | Object | No |
campaign_filter.campaign_type_ids | Campaign types to include. Use | Array | No |
campaign_filter.statuses | Campaign statuses to include. Allowed values are | Array | No |
campaign_filter.accounts | Sender phone numbers to include. Example: | Array | No |
campaign_filter.tags | Tags to include. Each element can be an integer tag ID or a string tag name. Mixed arrays are supported. Example: | Array | No |
campaign_filter.show_architect | Set to | Boolean | No |
Sample Request
curl --location 'https://gw.api.insidethekube.com/api/wa/v2/statistics/overall' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {oauth2-token}' \
--data '{
"start_time": 1740787200,
"end_time": 1743379200,
"campaign_filter": {
"campaign_type_ids": ["all"],
"statuses": ["all"]
}
}' Sample Response
{
"chart": {
"dates": ["2025-03-01", "2025-03-02"],
"datesAsTimestamp": [1740787200, 1740873600],
"sent": [1200, 980],
"delivered": [1150, 940],
"open": [400, 310],
"click": [120, 95],
"conversion": [30, 22],
"verified": [0, 0],
"responses": [0, 0],
"clickFromResponses": [0, 0],
"conversionFromResponses": [0, 0]
},
"summary": {
"sent": 2180,
"delivered": 2090,
"open": 710,
"click": 215,
"conversion": 52,
"revenue": 0,
"drop": 45,
"targeted": 2225,
"unsubscribe": 3,
"undelivered": 90,
"deliveryPending": 0,
"dropDetails": {
"frequencyCapped": 10,
"duplicates": 5,
"invalidPhoneNumbers": 8,
"tierLimitation": 0,
"templateFailures": 2,
"pausedTemplates": 0,
"recipientRelatedErrors": 15,
"metaTemporaryErrors": 3,
"accountIntegrationErrors": 0,
"internalErrors": 2,
"rateLimits": 0,
"policyFailures": 0
},
"undeliveredDetails": {
"recipientRelatedErrors": 40,
"accountVerificationErrors": 5,
"mediaErrors": 0,
"heldMessages": 10,
"metaExperiment": 0,
"metaErrors": 20,
"invalidMessages": 5,
"metaRecipientLimitsErrors": 10,
"deliveryReportMissing": 0
}
},
"details": [
{
"id": 12345,
"status": "completed",
"campName": "Spring Campaign",
"isConversational": false,
"campaignType": "standard",
"startsOn": 1740787200,
"endsOn": 1741046400,
"campaignLastDeliveryDate": 1741046400,
"tags": [{ "id": 1, "name": "promo" }],
"phoneNumber": "+905xxxxxxxxx",
"phoneNumberName": "Main Number",
"sent": 1200,
"delivered": 1150,
"open": 400,
"click": 120,
"conversion": 30,
"revenue": 0,
"drop": 25,
"targeted": 1225,
"unsubscribe": 2,
"undelivered": 50,
"deliveryPending": 0,
"dropDetails": { "...": "same keys as summary.dropDetails" },
"undeliveredDetails": { "...": "same keys as summary.undeliveredDetails" }
}
]
}
For conversational campaigns, each details item additionally contains:
{
"responses": [
{
"cardId": 1,
"buttonName": "Yes, I'm interested",
"sent": 1200,
"delivered": 1150,
"open": 400,
"click": 120,
"conversion": 30,
"revenue": 0,
"isNoReplyMessage": false
}
],
"responseSummary": {
"sent": 1200,
"open": 400,
"click": 120,
"conversion": 30,
"buttonClick": 95
}
}
Error Responses
200 OK
This status indicates that the request has been completed successfully.
{
"data": {
"statistics": {
"sent": 120,
"delivered": 118,
"read": 94
}
}
} 400 Failed to Parse Request (3001)
This status indicates that the request body cannot be parsed.
{
"message": "failed to parse request",
"errorCode": "3001",
"errors": "json: cannot unmarshal string into Go struct field ..."
} 400 Validation Failed (3002)
This status indicates that the request payload does not satisfy endpoint validation rules.
For example: range exceeds one year.
{
"message": "validation failed",
"errorCode": "3002",
"errors": "date range cannot exceed 1 year"
}
Other common validation messages:
start_time is requiredend_time is requiredstart_time must be a 10-digit unix timestampend_time must be a 10-digit unix timestampend_time must be greater than start_timeinvalid campaign_type_id: <value>, allowed values are: all, 1, 2, 3, 5, 6invalid status: <value>, allowed values are: all, active, test, passive, completed, failed, scheduled, draft, stoptag at index <i> must be a string or integer
403 WhatsApp Product Is Not Active (3007)
This status indicates that the partner does not have the WhatsApp product enabled.
{
"message": "WhatsApp product is not active",
"errorCode": "3007"
} 422 Unprocessable Entity
This status is forwarded from whatsapp-business-be when downstream validation fails.
For example: unresolved tag names after remapping.
{
"message": "The given data was invalid.",
"errors": {
"campaign_filter": {
"tags": [
"The following tag names could not be found: promo"
]
}
}
} 429 Rate Limited (2021)
This status indicates that the rate limit has been exceeded.
{
"message": "rate limited",
"error": {
"message": "rate limited",
"code": 2021
}
} Limitations
All functions must be executed with an HTTPS POST request.
The X-INS-AUTH-KEY should be provided as the authorization key on the request header. If the key is incorrect, the operation will not be executed, and an authorization error will be returned in the response.
This API provides data for a 1-year range.
You can send 100 requests per second with the same API Key.
The default limit shown here is a standard baseline. If your use case requires higher capacity, feel free to reach out to the Insider One team — we can adjust it to fit your needs.