FlaresendDocs
Admin API

Revoke an API key

Stop a key from working, immediately and for good.

DELETE/v1/admin/api-keys/{id}Admin key

Sets the key's revokedAt. From then on every request with it fails with 401 revoked_api_key. There is no way to un-revoke a key; create a new one instead. The key record is not deleted and still shows in List API keys.

Revoking a key that is already revoked succeeds and keeps the original revokedAt.

Path parameters

idstringpathrequired

The key ID.

Response

Status 200 with the key record, now with revokedAt set. Fields are described in Create an API key.

Errors

StatusCodeWhen
404api_key_not_foundNo key has this ID.