Get account usage

View as Markdown

Activity analytics for the account over a selected window, derived from real message and call records: headline metrics with per-day spark series and deltas, a daily activity series, voice-call duration stats, the most active numbers, and fixed-window breakdown totals.

Authentication

AuthorizationBearer

Your Dial API key, sent as Authorization: Bearer sk_live_...

Query parameters

daysenumOptionalDefaults to 30

The analytics window. One of 7, 30, or 90. Defaults to 30; any other value falls back to 30.

Allowed values:

Response

Usage analytics for the selected window.
periodDaysinteger

The selected window in days (7, 30, or 90).

statsobject

Headline metrics for the selected window — each with a per-day spark series and percent change vs the previous equal window.

serieslist of objects

One entry per calendar day in the selected window (UTC), oldest first.

callDurationobject

Voice-call talk-time stats for connected calls (duration > 0) in the window.

topNumberslist of objects

Account numbers ranked by total activity (messages + calls) in the window, descending (up to 6).

breakdownobject

Fixed-window totals (last 7 days, last 30 days, all time).

totalsobject

All-time totals.

currentPeriodobject

Usage for the current period — a monthly cycle anchored to the account’s creation date (jumps of one month from createdAt; stands in until billing and pricing are defined). Independent of the days window. Split per number (plus an all aggregate) by direction and domestic/international.

Errors

401
Unauthorized Error