Skip to main content
GET
/
billing
/
usage-summary
Get Billing Usage Summary
curl --request GET \
  --url https://collectwiseapi.com/billing/usage-summary \
  --header 'collectwise_key: <api-key>'
import requests

url = "https://collectwiseapi.com/billing/usage-summary"

headers = {"collectwise_key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {collectwise_key: '<api-key>'}};

fetch('https://collectwiseapi.com/billing/usage-summary', 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://collectwiseapi.com/billing/usage-summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"collectwise_key: <api-key>"
],
]);

$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://collectwiseapi.com/billing/usage-summary"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("collectwise_key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://collectwiseapi.com/billing/usage-summary")
.header("collectwise_key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://collectwiseapi.com/billing/usage-summary")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["collectwise_key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "object": "billing.usage_summary",
  "organization": "Acme Collections",
  "period": {
    "start_date": "2025-02-01",
    "end_date": "2025-02-28"
  },
  "sms": {
    "count": 185040,
    "cost": 5551.2,
    "unit_cost": 0.03,
    "unit": "segments"
  },
  "mms": {
    "count": 4000,
    "cost": 120,
    "unit_cost": 0.03,
    "unit": "segments"
  },
  "email": {
    "count": 15000,
    "cost": 0,
    "unit_cost": 0,
    "unit": "messages"
  },
  "rvm": {
    "drops": 50000,
    "drop_cost": 700,
    "drop_unit_cost": 0.014,
    "duration_seconds": 150000,
    "duration_hours": 41.67,
    "duration_cost": 137.5,
    "duration_unit_cost_per_hour": 3.3,
    "total_cost": 837.5
  },
  "calls_outbound": {
    "minutes": 10000,
    "cost": 1080,
    "unit_cost": 0.108,
    "unit": "minutes"
  },
  "calls_inbound": {
    "minutes": 5100,
    "cost": 1190,
    "unit": "minutes"
  },
  "total_cost": 8778.7,
  "currency": "usd"
}
{
"error": {
"type": "invalid_request_error",
"message": "start_date is required and must be YYYY-MM-DD or a full ISO 8601 UTC timestamp",
"param": "start_date"
}
}
{
"error": {
"type": "invalid_request_error",
"message": "start_date is required and must be YYYY-MM-DD or a full ISO 8601 UTC timestamp",
"param": "start_date"
}
}
{
"error": {
"type": "invalid_request_error",
"message": "start_date is required and must be YYYY-MM-DD or a full ISO 8601 UTC timestamp",
"param": "start_date"
}
}

Date Handling

Both start_date and end_date accept two formats:
  • Date only (YYYY-MM-DD) — start_date defaults to midnight UTC, end_date defaults to 23:59:59 UTC. Simplest option when you want full-day UTC boundaries.
  • Full ISO timestamp (YYYY-MM-DDTHH:mm:ssZ) — Exact UTC boundaries. Use this when you need timezone-specific alignment.
You can mix formats (e.g., date-only for start, ISO timestamp for end).

Timezone-Aligned Example

To query “February in US Eastern Time”, send:
start_date=2025-02-01T05:00:00Z
end_date=2025-03-01T04:59:59Z

Notes

  • RVM has two-part pricing: a per-drop fee plus a per-hour duration fee — both are included in rvm.total_cost
  • All costs are in USD and rounded to 2 decimal places

Authorizations

collectwise_key
string
header
required

Query Parameters

start_date
string
required

Start of date range. Accepts YYYY-MM-DD (defaults to 00:00:00 UTC) or a full ISO 8601 UTC timestamp like 2025-02-01T05:00:00Z

end_date
string
required

End of date range. Accepts YYYY-MM-DD (defaults to 23:59:59 UTC) or a full ISO 8601 UTC timestamp like 2025-02-28T04:59:59Z

Response

Usage summary retrieved successfully

object
string

Object type identifier

Example:

"billing.usage_summary"

organization
string

Your organization name

period
object
sms
object
mms
object
email
object
rvm
object

Ringless Voicemail — has two-part pricing (per-drop + per-hour duration)

calls_outbound
object
calls_inbound
object
total_cost
number

Total cost across all channels in USD

currency
string

Currency code

Example:

"usd"