Get Overall WhatsApp Campaign Analytics

Prev Next

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://whatsapp.useinsider.com/v1/statistics/overall

Headers

Header

Sample Value

Description

x-ins-auth-key

INS.**********************

This key is required to authorize your request. Refer to Generate a WhatsApp Campaign Analytics API Key to generate your 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 start_time. The maximum supported range is 1 year.

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 "all" for all types, or a subset of: 1 (standard), 2 (AB test), 3 (split), 5 (transactional), 6 (other).

Array

No

campaign_filter.statuses

Campaign statuses to include. Allowed values are "all", "active", "test", "passive", "completed", "failed", "scheduled", "draft", and "stop".

Array

No

campaign_filter.accounts

Sender phone numbers to include. Example: ["+905xxxxxxxxxx"].

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: [42, "promo"]. Unknown tag names return a 422 error.

Array

No

campaign_filter.show_architect

Set to true to include Architect (Journey Builder) messages in the results.

Boolean

No

Sample Request

 curl --location 'https://whatsapp.useinsider.com/v1/statistics/overall' \    
    --header 'Content-Type: application/json' \    
    --header 'x-ins-auth-key: INS.**************************************' \    
    --data '{    
      "start_time": 1740787200,    
      "end_time": 1743379200,    
      "campaign_filter": {    
        "campaign_type_ids": ["all"],    
        "statuses": ["all"]    
      }    
    }'    

Sample Responses

 {    
      "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    
      }    
    }    

200 OK

This status indicates that the request has been completed successfully.

 {    

      "data": {    
        "statistics": {    
          "sent": 120,    
          "delivered": 118,    
          "read": 94    
        }    
      }    
    }    

Error Responses

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 required

  • end_time is required

  • start_time must be a 10-digit unix timestamp

  • end_time must be a 10-digit unix timestamp

  • end_time must be greater than start_time

  • invalid campaign_type_id: <value>, allowed values are: all, 1, 2, 3, 5, 6

  • invalid status: <value>, allowed values are: all, active, test, passive, completed, failed, scheduled, draft, stop

  • tag at index <i> must be a string or integer

401 Authentication Required (1001)

This status indicates that the x-ins-auth-key header is missing.

       
    {    
      "message": "authentication required",    
      "errorCode": "1001"    
    }    
       

401 Unauthorized

This status indicates that the auth key is invalid or cannot be authorized.

   {    
      "message": "unauthorized",    
      "error": {    
        "message": "unauthorized"    
      }    
    }    

This response does not have a stable top-level errorCode in the statistics handler path.

403 IP Restricted (1088)

This status indicates that the auth key is not allowed from the caller IP.

   {    
      "message": "ip-restricted",    
      "error": {    
        "message": "ip-restricted",    
        "code": 1088    
      }    
    }    

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.