Skip to main content

Get Current Usage

GET /v1/account/usage
Returns your current resource usage and plan limits for the current billing period. Use this to monitor how close you are to hitting plan limits before creating new resources.

Response

{
  "data": {
    "billing_period": {
      "year": 2026,
      "month": 3,
      "start": "2026-03-01T00:00:00.000Z",
      "end": "2026-03-31T23:59:59.000Z"
    },
    "api_calls": {
      "used": 12847,
      "limit": 100000,
      "percentage": 12.85
    },
    "resources": {
      "routes": { "used": 8, "limit": 50 },
      "secrets": { "used": 12, "limit": 100 },
      "clients": { "used": 5, "limit": 25 },
      "environments": { "used": 3, "limit": null }
    },
    "plan": "pro",
    "status": "active"
  },
  "meta": { "request_id": "550e8400-e29b-41d4-a716-446655440000" }
}
A limit of null means the resource is unlimited on your current plan.
curl https://api.knoxcall.com/v1/account/usage \
  -H "Authorization: Bearer tk_live_abc123..."
import requests

resp = requests.get(
    "https://api.knoxcall.com/v1/account/usage",
    headers={"Authorization": "Bearer tk_live_abc123..."}
)
usage = resp.json()["data"]
print(f"API calls: {usage['api_calls']['used']}/{usage['api_calls']['limit']}")
const resp = await fetch("https://api.knoxcall.com/v1/account/usage", {
  headers: { Authorization: "Bearer tk_live_abc123..." }
});
const { data: usage } = await resp.json();
console.log(`API calls: ${usage.api_calls.used}/${usage.api_calls.limit}`);