curl "https://api.tracklysms.com/api/v2/billing/statements/2026-06?childAccountId=1042" \
-H "X-Api-Key: trk_your_parent_key"
{
"period": "2026-06",
"generated_at": "2026-07-26T16:00:00Z",
"lines": [ { "id": "66a...", "charge_type": "usage", "status": "succeeded", "amount": 812.44, "currency": "usd" } ],
"bypassed_lines": [],
"billed_total": 812.44,
"refunds_total": 0.0,
"net_total": 812.44,
"bypassed_total": 0.0,
"currency": "usd",
"reconciliation": "lines (succeeded+refunded) foot to billed_total; bypassed_lines foot to bypassed_total; net_total = billed_total − refunds_total"
}
Usage & Billing (v2)
Get Billing Statement
A footed statement for one account and billing period — line items that add up to the totals.
GET
/
v2
/
billing
/
statements
/
{period}
curl "https://api.tracklysms.com/api/v2/billing/statements/2026-06?childAccountId=1042" \
-H "X-Api-Key: trk_your_parent_key"
{
"period": "2026-06",
"generated_at": "2026-07-26T16:00:00Z",
"lines": [ { "id": "66a...", "charge_type": "usage", "status": "succeeded", "amount": 812.44, "currency": "usd" } ],
"bypassed_lines": [],
"billed_total": 812.44,
"refunds_total": 0.0,
"net_total": 812.44,
"bypassed_total": 0.0,
"currency": "usd",
"reconciliation": "lines (succeeded+refunded) foot to billed_total; bypassed_lines foot to bypassed_total; net_total = billed_total − refunds_total"
}
Returns a statement for a single account and period: the individual line items and the totals they foot to. Unlike usage summary, this does not roll up children — it reports one account (the caller by default, or the child named in
childAccountId).
Path Parameters
string
required
The billing month as
YYYY-MM.Query Parameters
integer
Report on one owned child instead of the caller. No portfolio rollup — use usage summary for that.
Response Fields
string
The
YYYY-MM period.string
When the statement was computed.
array
Billed line items (succeeded + refunded records; see billing record). Foot to
billed_total.array
Comped/bypassed line items. Foot to
bypassed_total.number
Sum of
lines.number
Total refunds within the period.
number
billed_total − refunds_total.number
Sum of
bypassed_lines.string
Currency.
string
A plain-language note describing how the lines foot to the totals.
Examples
curl "https://api.tracklysms.com/api/v2/billing/statements/2026-06?childAccountId=1042" \
-H "X-Api-Key: trk_your_parent_key"
{
"period": "2026-06",
"generated_at": "2026-07-26T16:00:00Z",
"lines": [ { "id": "66a...", "charge_type": "usage", "status": "succeeded", "amount": 812.44, "currency": "usd" } ],
"bypassed_lines": [],
"billed_total": 812.44,
"refunds_total": 0.0,
"net_total": 812.44,
"bypassed_total": 0.0,
"currency": "usd",
"reconciliation": "lines (succeeded+refunded) foot to billed_total; bypassed_lines foot to bypassed_total; net_total = billed_total − refunds_total"
}
Error Codes
| HTTP Status | Error Code | Description |
|---|---|---|
| 400 | invalid_period | period is not a valid YYYY-MM. |
| 400 | invalid_child | childAccountId is malformed. |
| 404 | child_not_found | The childAccountId is not an owned child. |