POST
/
v1
/
keys.deleteKey
Delete API key
curl --request POST \
  --url https://api.unkey.dev/v1/keys.deleteKey \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "keyId": "key_1234",
  "permanent": false
}'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
keyId
string
required

The id of the key to revoke

Minimum length: 1
Example:

"key_1234"

permanent
boolean
default:false

By default Unkey soft deletes keys, so they may be recovered later. If you want to permanently delete it, set permanent=true. This might be necessary if you run into CONFLICT errors during key migration.

Response

The key was successfully revoked, it may take up to 30s for this to take effect in all regions

The response is of type object.