Skip to main content
GET
Campaign consumption
Retrieve per-campaign call volume, talk time and cost across your company. Unlike List Campaigns, this endpoint is not limited to the token’s workspace — a company-level token can report on every workspace at once, or narrow to specific workspaces and campaigns.

API Endpoint

GET /api/v1/global/campaign-consumption Base URL: https://www.tryunleashx.com Authentication: Required (Token header: token or api_access_token)

Query Parameters

All parameters are optional.

Date Range Filters

If neither filter nor a valid fromDate / toDate pair is supplied, the range falls back to today. An unparseable custom range also falls back to today rather than returning an error.

Success Response

Status Code: 200 OK

Response Fields

Consumption Object

Totals Object

Grand totals across every matching campaign, not just the current page — so page 2 reports the same totals as page 1.

Date Range Object

Pagination Object

Notes

  • Campaigns with no calls are still returned, at zero. The date range filters the calls, not the campaigns, so a campaign that was idle in the window appears with total_calls: 0 instead of disappearing from the report.
  • Results are ordered by total_cost descending, then by campaign ID descending.
  • Cost comes from the actual charged call cost, not an estimate.
  • Filtering is always restricted to the token’s company, so a workspace_id from another company returns no records. Use List Workspaces to look up valid ids.

Example cURL

Monthly consumption for one campaign in one workspace

All campaigns across the company for the last 7 days

Custom date range across two workspaces

Headers

token
string
required

API token for authentication

Query Parameters

workspace_id
string

Restrict to one or more workspaces. Accepts a single id, a comma-separated list, or a JSON array. Always restricted to the token's company.

campaign_id
string

Restrict to one or more campaigns. Accepts a single id, a comma-separated list, or a JSON array.

filter
enum<string>

Date-range shorthand applied to the calls. Defaults to today when neither filter nor fromDate/toDate is supplied.

Available options:
today,
yesterday,
week,
last_week,
month,
last_month,
last_7_days
fromDate
string<date>

Custom range start (YYYY-MM-DD). Used only when filter is omitted; must be sent together with toDate.

toDate
string<date>

Custom range end (YYYY-MM-DD). Used only when filter is omitted; must be sent together with fromDate.

page
integer

Page number (default: 1)

limit
integer

Records per page (default: 10)

Response

Campaign consumption retrieved successfully

consumption
object[]
totals
object

Grand totals across every matching campaign, not just the current page

date_range
object | null
pagination
object