const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.ninjachat.ai/api/v1/management/keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.ninjachat.ai/api/v1/management/keys/{id}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://www.ninjachat.ai/api/v1/management/keys/{id}/rotate \
--header 'Authorization: Bearer <token>'{}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}management.keys.rotate
Requires keys:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.ninjachat.ai/api/v1/management/keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.ninjachat.ai/api/v1/management/keys/{id}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://www.ninjachat.ai/api/v1/management/keys/{id}/rotate \
--header 'Authorization: Bearer <token>'{}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
Account-scoped management credential created by the account owner after email verification. Inference keys cannot access these endpoints; management keys cannot run inference.
Path Parameters
^[a-fA-F0-9]{24}$Response
Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.
The response is of type object.