Skip to content

Rotate an API key

POST
/v1/keys/{key_id}/rotate
import requests
resp = requests.post(
"https://api.ultimateteam.ai/v1/keys/{key_id}/rotate",
headers={"X-API-Key": "utk_live_YOUR_KEY"},
)
print(resp.json())

Issue a replacement key and mark the old key for deletion after a 24h grace period. The new raw key is returned exactly once in this response.

key_id
required
Key Id
string format: uuid
X-API-Key
Any of:
string

Successful Response

Media typeapplication/json
Response Rotate Key V1 Keys Key Id Rotate Post
Examplegenerated
example

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
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}