Docs
API · API keys

Delete an API key

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}

01 Path parameters

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

02 Request

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

03 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.

04 Errors

404 not_founderrorOptional
No key with that id exists in your account.
409 conflictkey_in_useOptional
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 conflictkey_internalOptional
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 irreversibleThere 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.