Create a usage key
Makes a key for sending events to the usage meter (POST https://usage.comecero.com/v1/events). A live token makes apk_live_ keys, a test token apk_test_ keys. The key is shown only in this answer. See Send Usage. Secret and trusted tokens may call it; a limited token may not (403).
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
An optional name.
application/json- body
name?stringUp to 100 characters.
Success.
application/json- response
Lets your server send events to the usage meter at https://usage.comecero.com/v1/events. See https://docs.comecero.com/docs/usage-billing/usage-meter-api
object?stringAlways usage_key.
usage_key_id?stringuk_ plus 32 characters.
name?stringYour label.
key_prefix?stringThe first characters of the key, to tell keys apart.
status?stringactive or revoked.
"active""revoked"active_in_apollo?booleanWhether 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?booleantrue for apk_test_ keys.
date_created?stringWhen it was created.
date-timedate_revoked?|When it was revoked.
date-timekey?|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.
curl -X POST 'https://api.comecero.com/api/v1/usage/keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "Production server"}'{ "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_..."}List usage keys GET
Newest first, up to 200. The key itself is never shown. Works while usage billing is turned off. Secret and trusted tokens may call it; a limited token may not (`403`).
Revoke a usage key POST
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`).