Get Usage
curl --request GET \
--url https://api.voiceaiwrapper.app/api/v2/external-billing/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.voiceaiwrapper.app/api/v2/external-billing/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.voiceaiwrapper.app/api/v2/external-billing/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voiceaiwrapper.app/api/v2/external-billing/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.voiceaiwrapper.app/api/v2/external-billing/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.voiceaiwrapper.app/api/v2/external-billing/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/external-billing/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"client_id": "42",
"client_name": "Acme Corp",
"subscription_id": "1",
"minutes_included_limit": "300.00",
"minutes_included_used": "120.50",
"minutes_addon_balance": "60.00",
"minutes_billable_used": "0.00",
"current_period_start": "2025-01-01T00:00:00",
"current_period_end": "2025-02-01T00:00:00",
"updated_at": "2025-01-15T10:00:00"
}
],
"meta": {
"total": 1,
"page": 1,
"page_size": 20
}
}{
"message": "Authorization header not found"
}{
"message": "External Billing API access requires a PRO plan. Error Code: external_billing_api"
}{
"message": "Client not found"
}{
"message": "Internal server error"
}Usage
Get Usage
Retrieve minute usage records for your tenant - included minutes, add-on balance, and billable overage.
GET
/
api
/
v2
/
external-billing
/
usage
Get Usage
curl --request GET \
--url https://api.voiceaiwrapper.app/api/v2/external-billing/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.voiceaiwrapper.app/api/v2/external-billing/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.voiceaiwrapper.app/api/v2/external-billing/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voiceaiwrapper.app/api/v2/external-billing/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.voiceaiwrapper.app/api/v2/external-billing/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.voiceaiwrapper.app/api/v2/external-billing/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/external-billing/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"client_id": "42",
"client_name": "Acme Corp",
"subscription_id": "1",
"minutes_included_limit": "300.00",
"minutes_included_used": "120.50",
"minutes_addon_balance": "60.00",
"minutes_billable_used": "0.00",
"current_period_start": "2025-01-01T00:00:00",
"current_period_end": "2025-02-01T00:00:00",
"updated_at": "2025-01-15T10:00:00"
}
],
"meta": {
"total": 1,
"page": 1,
"page_size": 20
}
}{
"message": "Authorization header not found"
}{
"message": "External Billing API access requires a PRO plan. Error Code: external_billing_api"
}{
"message": "Client not found"
}{
"message": "Internal server error"
}This endpoint requires a PRO plan or above. If your plan does not include the External Billing API, the request returns
403 with error code external_billing_api.Combining filters
All query parameters are optional and can be used together or individually:GET /api/v2/external-billing/usage?client_id=<ID>
GET /api/v2/external-billing/usage?client_id=<ID>&page=2&page_size=50
GET /api/v2/external-billing/usage
| Parameter | Optional | Notes |
|---|---|---|
client_id | Yes | Scope to a single client. Omit to return all clients. |
page | Yes | Defaults to 1. |
page_size | Yes | Defaults to 20, max 100. |
Understanding the usage fields
| Field | What it means |
|---|---|
minutes_included_limit | The total included minutes granted by the client’s current plan for this billing period. Resets at period end. |
minutes_included_used | Included minutes consumed so far in the current period. |
minutes_addon_balance | Remaining balance of add-on pack minutes. Does not reset at period end - carries forward until exhausted. |
minutes_billable_used | Minutes consumed beyond both the included limit and the add-on balance. These will be billed as overage. |
How minutes are consumed
Incoming call minute
→ first draws from minutes_included_limit
→ once exhausted, draws from minutes_addon_balance
→ once both exhausted, increments minutes_billable_used (overage)
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter usage for a specific client. Accepts a plain integer ID or a base64 GraphQL global ID. Omit to return all clients under the tenant.
Example:
"Q2xpZW50OjEyMw=="
Page number. Default: 1.
Example:
1
Results per page. Default: 20. Maximum: 100.
Required range:
x <= 100Example:
20
Was this page helpful?

