Skip to content

Rotate Tenant Key

POST
/v1/tenants/{tenant_id}/rotate-key
curl --request POST \
--url https://api.uavcrew.ai/v1/tenants/example/rotate-key \
--header 'Authorization: Bearer <token>'

Rotate the K1 API key for a tenant.

Revokes all existing keys and issues a new one. The raw key is returned once — store it securely.

tenant_id
required
Tenant Id
string

Successful Response

Media typeapplication/json
RotateKeyResponse
object
api_key
required
Api Key
string
message
Message
string
default: New API key issued. The previous key has been revoked.

Example

{
"message": "New API key issued. The previous key has been revoked."
}

Validation Error

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

Example generated

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