Usage
How to read daily usage, and delivery and consent totals.
GET /v1/usage?from=YYYY-MM-DD&to=YYYY-MM-DD needs usage:read. from is included and to is not, so from must be before to. Other values return 422.
{ "data": [{ "day": "2026-10-01", "conversations": 3, "inboundMessages": 12, "outboundRcs": 14, "outboundSms": 0, "estCostMicroUsd": null, "gapsRecorded": 1, "toolCalls": 9, "workflowsCompleted": 1 }] }The days come from daily summaries, and MessageOS turns those on. Until they are on, the answer is { "data": [] } for every range, so an empty list does not mean nothing was sent. A day that was never summarized is left out of the list, not shown with zeros. Ask MessageOS to turn the summaries on if you need this endpoint.
To see what was sent and received without waiting for a summary, open the Usage page of the dashboard. It counts messages as they happen.
estCostMicroUsd is null until a rate card is configured. The response is a measurement, not a charge. A conversation is one thread after the idle gap.
Delivery and consent totals
GET /v1/usage/summary?from=YYYY-MM-DD&to=YYYY-MM-DD needs usage:read. from is included and to is not. Days are UTC. The range can be at most 92 days, and its dates are in the year 2000 or later. Other values return 422.
{
"from": "2026-10-01",
"to": "2026-10-03",
"timeZone": "UTC",
"totals": { "sent": 40, "delivered": 38, "read": 21, "failed": 1, "optedOut": 2, "optedIn": 1 },
"rates": { "delivered": 0.95, "read": 0.5526, "failed": 0.025 },
"days": [
{ "day": "2026-10-01", "sent": 30, "delivered": 29, "read": 20, "failed": 1, "optedOut": 0, "optedIn": 0 },
{ "day": "2026-10-02", "sent": 10, "delivered": 9, "read": 1, "failed": 0, "optedOut": 2, "optedIn": 1 }
],
"failureReasons": [{ "reason": "The file could not be fetched", "count": 1 }]
}MessageOS turns this endpoint on. Until it is on, it answers 404.
It counts as messages are sent and reports arrive, so it does not wait for a daily summary. Every day of the range has a row, with zeros on a day with nothing.
sentis each message handed to the messaging network, counted once, on the day it was sent. Before an agent is live, the network can reject a message to a test phone, and MessageOS may send it again. That is still one message here.deliveredis a sent message with a delivered or a read report.readis one with a read report. A phone with read receipts off never reports a read.failedis a sent message with a failed report.failureReasonslists up to five reasons, most common first. The words are the messaging network's own and can change, so do not match on them.optedOutcounts each time a contact sent an opt-out word such as STOP, or unsubscribed from their messaging app.optedIncounts each time a contact sent an opt-in word such as START, or subscribed from their messaging app. The same one repeated within two minutes is counted once. They count messages, not contacts: a contact who is already opted out and sends STOP again later is counted again, and so is a START from a contact who never opted out. To follow one contact's consent, use thecontact.opted_outandcontact.opted_inwebhooks oroptedInon the contact.- In
rates,deliveredandfailedare shares ofsent, andreadis a share ofdelivered. Each is from 0 to 1, and null when there is nothing to take a share of.
A report can arrive after the day its message was sent. It is counted on the day the message was sent, so the numbers for a recent day can still go up.
A message whose expiry ran out is not counted as failed.
The Overview page of the dashboard counts by the same rules. Its numbers can differ from this endpoint's for two reasons. The Overview totals every agent of a brand, and this endpoint counts the key's own agent. The Overview's 7, 30, and 90 day ranges end at the present moment, and this endpoint counts whole UTC days.
