Skip to main content
Revoke a key. The next request it makes is rejected immediately. This is a soft delete — the row is retained for the audit trail (who sent what, last-used, revoked-at) but disappears from the list. DELETE /v1/api-keys/{id}

Path parameters

id
string
required
The key id (e.g. ak_7Yq3Lm) to revoke — not its secret.

Request

curl https://api.drin.run/v1/api-keys/ak_7Yq3Lm \
  -X DELETE \
  -H "Authorization: Bearer $DRIN_API_KEY"

Response

Returns 204 No Content on success. The operation is idempotent — revoking an already-revoked key still succeeds. A revoked key is dropped from List API keys and any further request it makes returns 401.

Errors

404 not_found
error
No key with that id exists in your account.
409 conflict
key_in_use
You tried to delete the key authenticating this request. Use a different key to revoke it, so you don’t cut your own access mid-call.
409 conflict
key_internal
The target is an internal service key (e.g. the credential the dashboard runs on) and can’t be revoked through this API.
Revocation is immediate and irreversible. There is no un-revoke. Any service still holding the secret will start getting 401 on its next request, so rotate it in your deployments before (or right as) you revoke.