1. Customers
UsageRail API
  • HTTP check
    • Check a request
      POST
  • Customers
    • Create a customer
      POST
    • Get a customer
      GET
    • Claim an email or external ID
      POST
    • Get a customer's usage
      GET
  • Keys
    • Create a key
      POST
    • Revoke a key
      DELETE
  • Billing
    • Change a customer's plan
      POST
    • Open Stripe Checkout
      POST
    • Adjust a prepaid balance
      POST
  • Portal
    • Create a portal sign-in link
      POST
  • Schemas
    • Error
    • CheckRequest
    • CheckResult
    • Consumer
    • Usage
  1. Customers

Get a customer's usage

GET
/v1/consumers/{id}/usage
Ask for 1 to 30 calendar days in the app's time zone. The response's days is the number returned after your plan's retention limit. daily includes days with zero usage; endpoints lists up to 20 method and route pairs, ranked by request count.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params

Query Params

Responses

🟢200
application/json
Usage for the period.
Bodyapplication/json

🟠400Error
🟠404Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.usagerail.com/v1/consumers//usage?days=' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "days": 0,
    "retention_days": 0,
    "timezone": "string",
    "unit_mode": "string",
    "daily": [
        {
            "day": "2019-08-24",
            "requests": "string",
            "billable_requests": "string",
            "billable_units": "string"
        }
    ],
    "endpoints": [
        {
            "method": "string",
            "route": "string",
            "requests": "string",
            "billable_requests": "string",
            "billable_units": "string"
        }
    ]
}
Modified at 2026-11-21 14:07:45
Previous
Claim an email or external ID
Next
Create a key
Built with