Rotate Tenant Key
POST
/v1/tenants/{tenant_id}/rotate-key
const url = 'https://api.uavcrew.ai/v1/tenants/example/rotate-key';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”tenant_id
required
Tenant Id
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
RotateKeyResponse
object
api_key
required
Api Key
string
message
Message
string
Example
{ "message": "New API key issued. The previous key has been revoked."}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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": {} } ]}