comecerodocs

Revoke a usage key

POST
/usage/keys/{usage_key_id}/revoke

Safe to repeat. The usage meter stops taking the key within about a minute. Works while usage billing is turned off. Secret and trusted tokens may call it; a limited token may not (403).

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

usage_key_id*string

The usage key id.

Response Body

Success.

application/json
  1. response
object?string

Always usage_key.

usage_key_id?string

uk_ plus 32 characters.

name?string

Your label.

key_prefix?string

The first characters of the key, to tell keys apart.

status?string

active or revoked.

Value in"active""revoked"
active_in_apollo?boolean

Whether the usage meter takes events with this key now. For a new key it is false until the key reaches the meter (a few minutes at most). For a revoked key it stays true until the revoke reaches the meter.

test?boolean

true for apk_test_ keys.

date_created?string

When it was created.

Formatdate-time
date_revoked?|

When it was revoked.

Formatdate-time
key?|

The key itself: apk_live_ or apk_test_ plus 40 letters and digits. Only in the create answer; null everywhere else. Store it at once.

Example Request
curl -X POST 'https://api.comecero.com/api/v1/usage/keys/string/revoke'
Example Response
{  "object": "usage_key",  "usage_key_id": "uk_5d1c0e7a9b2f4e6c8a0d3b5f7e9c1a2b",  "name": "Production server",  "key_prefix": "apk_live_8Hq2",  "status": "active",  "active_in_apollo": true,  "test": false,  "date_created": "2026-11-01T09:30:00Z",  "date_revoked": null,  "key": "apk_live_..."}