Get WhatsApp Campaign List Analytics

Prev Next

Returns a paginated list of campaigns with metadata and basic sent counts. All parameters are optional. Useful for building campaign pickers and analytics dashboards.

Endpoint and Headers

POST https://whatsapp.useinsider.com/v1/statistics/campaign-list

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

statuses

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

Array

No

types

Campaign types to include. Allowed values are 1 (standard), 2 (AB test), 3 (split), 5 (transactional), and 6 (other). Note: all is not supported.

Array

No

name

Filter campaigns by name (case-insensitive).

String

No

per_page

Number of results per page. Allowed range is 1–100.

Integer

No

sort

Sort order in the format column|direction. Allowed columns are createDate, campName, activeDateStart, and activeDateEnd. Allowed directions are asc and desc.
Example: "createDate|desc".

String

No

tags

Tags to include. Each element can be an integer tag ID or a string tag name. Unknown tag names return a 422 error.

Array

No

accounts

Sender phone numbers to include.

Array

No

Sample Request

 curl --location 'https://whatsapp.useinsider.com/v1/statistics/campaign-list' \    
    --header 'Content-Type: application/json' \    
    --header 'x-ins-auth-key: INS.**************************************' \    
    --data '{    
      "statuses": ["active", "completed"],    
      "per_page": 20,    
      "sort": "createDate|desc"    
    }' 

Sample Responses

{    
      "data": [    
        {    
          "id": 12345,    
          "campName": "Spring Campaign",    
          "createDate": 1740787200,    
          "activeDateStart": 1740787200,    
          "activeDateEnd": 1741046400,    
          "isActive": 1,    
          "isTest": 0,    
          "neverEnds": 0,    
          "campaignTypeId": 1,    
          "isPinned": false,    
          "sent": 1200,    
          "phoneNumber": "+905xxxxxxxxx",    
          "phoneNumberName": "Main Number",    
          "status": "completed",    
          "subProductAlias": "standard",    
          "queryHash": "abc123",    
          "failedReason": null,    
          "approvalStatus": null,    
          "statusTranslation": "Completed",    
          "personalizationStatus": "ready",    
          "variations": [    
            {    
              "id": 1,    
              "builderId": 12345,    
              "variationId": 99001,    
              "variation": "A",    
              "variationRate": 100,    
              "templateHtml": "<p>...</p>"    
            }    
          ],    
          "tags": [    
            { "id": 1, "name": "promo" }    
          ]    
        }    
      ],    
      "current_page": 1,    
      "last_page": 5,    
      "per_page": 20,    
      "total": 98,    
      "from": 1,    
      "to": 20    
    }    

200 OK

This status indicates that the request has been completed successfully.

    {    
      "data": [    
        {    
          "campaignId": 123,    
          "campaignName": "Reminder Campaign",    
          "startTime": 1740314930,    
          "status": "active"    
        }    
      ],    
      "meta": {    
        "currentPage": 1,    
        "lastPage": 3,    
        "perPage": 20,    
        "total": 60    
      }    
    }    

400 Failed to parse request (3001)

    {    
      "message": "failed to parse request",    
      "errorCode": "3001",    
      "errors": "json: cannot unmarshal ..."    
    }  

400 Validation Failed (3002)

For example, per_page exceeds the maximum.

    {    
      "message": "validation failed",    
      "errorCode": "3002",    
      "errors": "per_page must be between 1 and 100"    
    }  

Other common validation messages:

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

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

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

  • page must be greater than or equal to 1

  • per_page must be between 1 and 100

  • invalid sort column: <value>, allowed values are: createDate, campName, activeDateStart, activeDateEnd

  • invalid sort direction: <value>, allowed values are: asc, desc

  • sort format must be 'column|asc' or 'column|desc'

401 Authentication Required (1001)

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

401 Unauthorized

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

403 IP Restricted (1088)

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

403 WhatsApp Product Is Not Active (3007)

   {    
      "message": "WhatsApp product is not active",    
      "errorCode": "3007"    
    } 

422 Unprocessable Entity

This status is forwarded when downstream validation fails.

For example: unresolved tag names.

    {    
      "message": "The given data was invalid.",    
      "errors": {    
        "tags": [    
          "The following tag names could not be found: promo"    
        ]    
      }    
    }   

Important

campaign-list has a status whitelist mismatch between meta-api and whatsapp-business-be.

  • meta-api accepts: all, active, test, passive, completed, failed, scheduled, draft, stop

  • whatsapp-business-be accepts: active, test, passive, draft, running, completed, failed, scheduled

This means values such as all and stop might pass meta-api validation but still fail downstream with 422.

429 Rate Limited (2021)

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

  • 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.