Get usage report
get_usage_reportFetch a paginated list of OTP transactions for a date range. Each transaction includes message_id, timestamp, phone_number, channel, country, cost, status, and the originating client IP. Date range cannot exceed 31 days. Defaults: last 7 days, page 1, 10 per page. Requires the API_REPORTING entitlement (Business or Enterprise plan). Use this to: audit recent activity, build internal dashboards, reconcile billing, or debug delivery issues across many recipients.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_usage_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for paginated results, starting at 1. Default 1. | |
| end_date | No | End date in YYYY-MM-DD format (UTC). If omitted, defaults to today. The range start_date..end_date cannot exceed 31 days. | |
| per_page | No | Results per page, 1-100. Default 10. | |
| start_date | No | Start date in YYYY-MM-DD format (UTC). If omitted, defaults to 7 days before today. The range start_date..end_date cannot exceed 31 days. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Present when the endpoint has no data for the range. | |
| per_page | No | Rows per page. | |
| total_count | No | Total transactions matching the date range. | |
| total_pages | No | Number of pages at the requested per_page. | |
| current_page | No | The page returned. | |
| transactions | No | Transaction rows for the page. May be empty or absent when there is no data. |