Skip to content

Revoke an API key

DELETE
/api/v1/admin/api-keys/{key_id}
curl --request DELETE \
--url https://example.com/api/v1/admin/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'X-Label-Hub-Key: <X-Label-Hub-Key>'

Sets enabled = False. The key will be rejected on next use. The row is kept for audit purposes (jobs referencing this key_id remain intact).

key_id
required
Key Id
string format: uuid

Successful Response

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}