1. Keys
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. Keys

Revoke a key

DELETE
/v1/keys/{key_id}
UsageRail revokes the key immediately. Running SDKs normally pick up the change within about 20 seconds; an SDK that can't reach UsageRail may still accept the key from its local cache.

Request

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

Header Params

Responses

🟢200
application/json
Revoked.
Bodyapplication/json

🟠404Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request DELETE 'https://api.usagerail.com/v1/keys/' \
--header 'Idempotency-Key;' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "key_id": "string",
    "status": "revoked"
}
Modified at 2026-11-21 14:07:45
Previous
Create a key
Next
Change a customer's plan
Built with