Create a usage report
POST/reporting/usage_reports
Check the status and retrieve a Usage Report with a call to: GET/reporting/usage_reports/{id}
- Usage Reports are available for 30 days
Request
- application/json
Body
required
Usage Report to add
start_time stringrequired
UTC (2024-09-25T00:00:00+00:00)
end_time string
UTC (2024-09-25T10:51:06+00:00). Must be less than 24 hours from now
aggregation_type integer
Default value: 0
Aggregate: All = 0, By Connection = 1
connections string[]
Array of connection IDs
Responses
200: UsageReport response
- application/json
400: Bad request
401: Unauthorized
Request samples
curl -L 'https://api.telnyx.com/reporting/usage_reports' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"start_time": "string",
"end_time": "string",
"aggregation_type": 0,
"connections": [
"string"
]
}'
Response samples
{
"id": "string",
"start_time": "string",
"end_time": "string",
"connections": [
"string"
],
"aggregation_type": 0,
"status": 1,
"report_url": "string",
"result": {},
"created_at": "string",
"updated_at": "string"
}