ready. Try Ready →Sign up

#Reports

Daily numbers for one account: texts sent, segments, delivered, replies and what was charged. An agency can pull them for each client account it manages.

Details

For a client, call with your own key and add X-Sub-Account-Id: <client id> (Acting as a client). List client ids with GET /v1/sub-accounts. For a nightly job, ask for yesterday in each client's timezone.

#Daily report

GET/v1/reports/daily

One row per calendar day in the account's timezone (Pacific if none is set), oldest first. Days with no activity are included with zeros.

  • Auth API key with reports access (plus team management to use X-Sub-Account-Id)
  • Cost Free

Query parameters

fromstringOptional
First day, YYYY-MM-DD. Send with to.
tostringOptional
Last day, YYYY-MM-DD, included. Today at the latest.
daysintegerOptionalDefault 30Max 93
The last N days, today included. Use days or from and to, not both. A range is at most 93 days.

Returns

account_idinteger
The account the report is for.
timezonestring
The timezone the days are counted in. Changing the account's timezone regroups past days too.
from, to, generated_atstring
The days covered, and when the report was read.
data[]object[]
date; complete (false for today); sms_sent (texts handed to the carrier, MMS not included); sms_segments_sent; sms_delivered (of those, delivered so far); replies (inbound messages, opt-outs not included); positive_replies; sms_cost_usd and total_usage_cost_usd (decimal strings, before refunds).
limitationsstring[]
What the costs leave out, in plain words. Number and registration fees are never in either cost.

Delivery receipts and reply tags can still change a past day, so fetch a day again if you need it final.

Errors

HTTPCodeWhen
400invalid_report_rangeAn unknown parameter, a bad or future date, from without to, days with dates, or more than 93 days.
403permission_deniedThe key lacks reports access, or team management when X-Sub-Account-Id is sent.
403report_scope_forbiddenThe key's user only sees contacts assigned to them.
429report_busyTwo reports for your account are already running. Wait for Retry-After seconds.
503report_unavailableThe report could not be read. Retry; do not record zeros.