GET
/api/public/v1/usage

Get the usage report

What the company is consuming this cycle and what it costs. Every amount is cents: `rows` breaks the cycle down by what was consumed, `bars` is the same spend across recent cycles for a trend. Deliberately `usage:read` rather than `billing:read` — seeing what the company spends does not imply access to the payment methods behind it, and vice versa.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

usage:read
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/usage" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Usage report retrieved successfully!",
  "content": {
    "rows": [
      {
        "key": "messaging",
        "label": "Messaging",
        "quantity": 4120,
        "amount": 82400
      }
    ],
    "bars": [
      {
        "label": "Aug",
        "messaging": 82400
      }
    ],
    "total": 214900
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Usage
/usage