Skip to content
Sign in Create account

Billing Monthly Usage

GET /api/v1/billing/monthly-usage

Performs the account operation at /api/v1/billing/monthly-usage.

Authenticate with a portal session token.

Responses

200 Monthly usage by calendar month.

application/json object

  • currency string required

    Currency of raw usage_records wallet micros.

    Value: "USD"
  • covers_legacy_usage boolean required

    True when monthly totals include all usage_records, including rows without receipts.

  • months array of object required

    Each item:

    • month string required
    • month_label string required
    • status string required
      One of: "in_progress", "closed", "paid"
    • total_cents integer required
    • total string required
    • call_count integer required
    • total_micros integer required

      Exact monthly total in USD micro-units from the usage ledger.

Generated sample

{
  "currency": "USD",
  "covers_legacy_usage": true,
  "months": [
    {
      "month": "string",
      "month_label": "string",
      "status": "in_progress",
      "total_cents": 0,
      "total": "string",
      "call_count": 0,
      "total_micros": 0
    }
  ]
}
401 Missing or invalid bearer token.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

403 The account lacks billing read permission.

application/json object

  • error object required
    • message string required
    • code string required
      Value: "forbidden"
422 The months query parameter is invalid.

application/json object

  • error object required
    • code string required
      Value: "validation_error"
    • message string required
    • fields object required

      Other keys: array of string

429 The request was rate limited. API-generated responses are JSON;

Response headers

  • Retry-After string header

    Seconds to wait before retrying, when provided.

  • X-RateLimit-Scope string header

    Identifies the scope of the request limit, when provided.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string