API v3
GET /sims/{id}/usage
Usage for a time range (at most 400 days).
Addresshttps://api.voicepro.plus/v3/sims/{id}/usage
Key permissionread
Fields
| Name | In | Type | |
|---|---|---|---|
| id * | path | string | |
| from | query | string | Default: 24 hours before to. |
| to | query | string | Default: now. |
| step | query | 5m | 1h | 1d | Default by range: 5m up to a day, 1h up to a week, else 1d. |
| compare_from | query | string | With compare_to: a previous period to compare. |
| compare_to | query | string |
* required
Example
curl -X GET "https://api.voicepro.plus/v3/sims/sim_K7M2Q9/usage?from=2026-10-01T00%3A00%3A00Z&to=2026-10-28T00%3A00%3A00Z&step=1d" \ -H "Authorization: Bearer vpkey_YOUR_KEY"
Response
{
"object": "sim_usage",
"sim_id": "sim_K7M2Q9",
"range": {
"from": "2026-10-01T00:00:00Z",
"to": "2026-10-28T00:00:00Z",
"step": "1d",
"timezone": "Europe/London"
},
"totals": {
"data_bytes": 4831838208,
"roaming_bytes": 214748364,
"calls": 42,
"call_seconds": 5210,
"sms": 17
},
"previous": {
"data_bytes": 3951369912,
"roaming_bytes": 0,
"calls": 38,
"call_seconds": 4480,
"sms": 21
},
"series": [
{
"t": "2026-10-26T00:00:00Z",
"data_bytes": 187695104,
"calls": 3,
"sms": 1
},
{
"t": "2026-10-27T00:00:00Z",
"data_bytes": 201326592,
"calls": 2,
"sms": 0
}
],
"by_country": [
{
"country": "GB",
"data_bytes": 4617089843
},
{
"country": "FR",
"data_bytes": 214748365
}
],
"data_as_of": "2026-10-28T08:55:00Z"
}Errors
Every error has the same shape: { "error": { "type", "code", "message", "param", "request_id" } }.
missing_api_key401: No Authorization header, or not a Bearer key.
invalid_api_key401: The key is not recognised.
api_key_revoked401: The key was revoked in the portal.
api_key_expired401: The key passed the expiry date set on it.
missing_scope403: The key lacks the scope this endpoint needs; param names the scope.
ip_not_allowed403: The key has an IP allowlist and this request came from elsewhere.
account_not_active403: The workspace is suspended or closed.
route_not_found404: No such path in v3.
resource_not_found404: No object with that id on this account.
service_not_enabled404: The account does not have this service (voice trunk, IoT, numbers); param names it.
rate_limited429: Too many requests for this key or for the whole account (the message says which); wait Retry-After seconds.
internal_error500: Our fault. Quote the request_id to support.