Numberly
Campaigns

Retrieve Statistics

This endpoint retrieves the statistics for a campaign based on its ID. Each value is a raw volume, aggregated across all send orders attached to the campaign.

Endpoint

GET {subdomain}.api.numberly.com/v1/campaigns/{id}/statistics

Parameters

LocationNameRequiredTypeDescription
PathidYesstringThe campaign ID (retrievable via /v1/campaigns, see Campaign Information).
Querystart_dateNodate-timeOnly counts sends started from this date inclusive (RFC3339 UTC format).
Queryend_dateNodate-timeOnly counts sends started up to this date inclusive (RFC3339 UTC format).

Note: start_date and end_date filter on the campaign send date. They are typically used to compare the performance of a recurring campaign across different time periods.

Request Example

This example retrieves the statistics for a campaign for the month of November 2024.

curl -X GET "https://{subdomain}.api.numberly.com/v1/campaigns/125/statistics?start_date=2024-11-01T00:00:00Z&end_date=2024-11-30T23:59:59Z" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json"

API Response

The response returns an object containing the campaign ID, its channel, and a statistics object detailing the aggregated volumes.

Key fields of statistics:

  • sent: Total volume of sent messages.
  • delivered: Volume of successfully delivered messages.
  • undelivered: Breakdown of undelivered messages — total, broken down into soft_bounces (temporary failure) and hard_bounces (permanent failure).
  • unsubscribed: Number of unsubscribes generated by the campaign.
  • total_opens / unique_opens: Total number of opens and number of unique openers.
  • total_clicks / unique_clicks: Total number of clicks and number of unique clickers.
  • unsubscribed_unique_clicks: Number of unique clickers who used an unsubscribe link.
  • links: The links array provides a breakdown of click volumes for each individual tracked link. Each link has a distinct identifier (id). When a campaign content has multiple versions, the same destination URL may appear several times. You can differentiate between these versions using the idm field, which corresponds to the unique identifier of the specific content version carrying the link
{
  "id": 125,
  "channel": "email",
  "statistics": {
    "sent": 1000,
    "delivered": 950,
    "undelivered": {
      "total": 50,
      "soft_bounces": 30,
      "hard_bounces": 20
    },
    "unsubscribed": 5,
    "total_opens": 500,
    "unique_opens": 400,
    "total_clicks": 100,
    "unique_clicks": 80,
    "unsubscribed_unique_clicks": 4,
    "links": [
      {
        "id": 101,
        "idm": 4001,
        "total_clicks": 60,
        "url": "https://example.com/offer"
      },
      {
        "id": 102,
        "idm": 4002,
        "total_clicks": 40,
        "url": "https://example.com/offer"
      }
    ]
  }
}

Important note: If the campaign channel does not (yet) support statistics calculation, the API returns a 501 Not Implemented status. If the campaign ID does not exist, it returns 404 Not Found.

Use Cases

  • Reporting Dashboard: Aggregate statistics across multiple campaigns to build an overall performance view.
  • Derived Rate Calculations: Using raw volumes, calculate metrics such as open rate (unique_opens / delivered) or click rate (unique_clicks / unique_opens).
  • Period Comparison: For recurring campaigns, call the endpoint with distinct start_date / end_date pairs to compare two send waves.