Reports
Daily numbers for one account: texts sent, segments, delivered, replies and what was charged. An agency can pull them for each sub-account it manages with X-Sub-Account-Id. For a nightly job, ask for yesterday in each sub-account’s timezone.
#Daily report
One row per calendar day in the account’s time zone (Pacific if none is set), oldest first. Days with no activity are included with zeros. Needs reports access, plus team management to use X-Sub-Account-Id.
Parameters
fromstring · query- First day,
YYYY-MM-DD. Send withto. tostring · query- Last day,
YYYY-MM-DD, included. Today at the latest. daysinteger · queryDefault30Max93- The last N days, today included. Use
daysorfromandto, not both. A range is at most 93 days. timezonestring · queryDefault: the account’s timezone- An IANA name such as
America/New_YorkorUTC. Days start and end at midnight in this zone.
Returns
account_idinteger- The account the report is for.
timezonestring- The time zone the days are counted in: the
timezoneyou sent, or the account’s. Changing the account’s time zone regroups past days too. from,to,generated_atstring- The days covered, and when the report was read.
data[]object[]- One row per day. Costs are decimal strings with refunds already subtracted.
Child attributes
datestring- The day.
completebooleanfalsefor today.sms_sentinteger- Texts handed to the carrier, MMS not included.
sms_segments_sentinteger- Segments of those texts.
sms_deliveredinteger- Of those, delivered so far.
repliesinteger- Inbound messages, opt-outs not included.
positive_repliesinteger- Positive replies that day.
inbound_messages,inbound_segmentsinteger- Every inbound text, opt-outs included.
opt_outsinteger- Opt-outs recorded that day from any source (STOP, CRM DND, litigator scrub, AI-detected intent, your own opt-outs); a contact who opts out twice counts twice.
sms_cost_usdstring- Outbound SMS with carrier fees.
screening_cost_usdstring- Number validation and scrubbing.
total_usage_cost_usdstring- All usage.
refunds_usdstring- How much was given back that day.
limitationsstring[]- What the costs leave out, in plain words. Number and registration fees are never in either cost. Older charges paid from a parent wallet before they were recorded against a sub-account are left out of that sub-account’s costs.
Delivery receipts and reply tags can still change a past day, so fetch a day again if you need it final.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_report_range | An unknown parameter, a bad or future date, from without to, days with dates, an unknown timezone, or more than 93 days. |
| 403 | sub_account_forbidden | X-Sub-Account-Id is sent and the key lacks team management, or the id is not a sub-account you manage. |
| 403 | report_scope_forbidden | The key’s user only sees contacts assigned to them. |
| 429 | report_busy | Two reports for your account are already running. Wait Retry-After seconds and send it again. |
| 503 | report_unavailable | The report could not be read. Retry; do not record zeros. |
#Overview report
The totals the Reports page shows for a period: texts sent, delivered, failed, replies, opt-outs and spend. Days start at midnight in the time zone of the key’s user. It counts your account and the sub-accounts under it, unlike the daily report. Needs reports access. A team member who sees only their assigned contacts gets totals for those contacts, with no spend.
Parameters
daysinteger · queryDefault30- The last N days.
1is the last 24 hours. from, tostring · query- A period instead of
days:YYYY-MM-DDfor whole days, or a full ISO 8601 time.
Returns
data.messages_sent,data.delivered,data.failed,data.no_receiptinteger- Texts sent, and of those delivered, failed, and with no final receipt yet.
data.segments_sent,data.segments_receivedinteger- Segments out and in.
data.delivery_ratenumber- Delivered out of sent, as a percent.
data.replies,data.reply_ratenumber- People who replied, and that out of delivered, as a percent.
data.positive_replies,data.positive_reply_ratenumber- Positive replies, and that out of delivered, as a percent.
data.opt_outs,data.opt_out_ratenumber | null- Opt-outs, and that out of delivered, as a percent. The rate is
nullwhen nothing was delivered. data.blockedinteger | null- Sends Ready stopped before they went out.
data.total_spent,data.cost_per_message,data.cost_per_deliverednumber | null- Spend in dollars, and per text sent and delivered.
nullwhen nothing was spent, and alwaysnullon a sub-account its agency pays for: the agency sees that spend on its own key. data.assigned_onlyboolean- Only there, as
true, when the totals cover the key user’s assigned contacts only.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_field | A parameter sent twice, or too long; field names it. |
| 403 | permission_denied | The key’s user has no reports access. |
| 503 | report_unavailable | The report couldn’t be read. Nothing changed; retry. |
#Calls report
Dialer totals for a period, as the Calls tab of Reports shows them. A key user who can manage the team gets the whole team’s calls; anyone else gets only the calls they placed. Needs reports access. For each call, use the call log.
Parameters
daysinteger · queryDefault30- The last N days.
from, toYYYY-MM-DD · query- Whole days instead of
days, in the key user’s time zone.
Returns
data.dialsinteger- Calls placed.
data.conversationsinteger- Calls that became a conversation.
data.talk_secondsinteger- Time spent in those conversations.
data.interestedinteger- Calls marked interested.
data.scopestringteamorrep(only the key user’s calls).data.assigned_onlyboolean- Only there, as
true, when the key user sees only their assigned contacts.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_field | A date that isn’t YYYY-MM-DD, or days that isn’t a whole number; field names it. |
| 403 | permission_denied | The key’s user has no reports access. |
| 503 | report_unavailable | The report couldn’t be read. Nothing changed; retry. |