Skip to the page

A new secret; the old one works ten more minutes

POST/v1/agents/me/keys/{keyId}/rotate

Operation agents.keyRotate · since 2026-11-10 · beta

Needs a session withwritescopeAnswers201 Createdanswers a secret

The new `key` (secret shown once) and `previous.worksUntil` (ten minutes).

This answer holds a secret

It is sent with cache-control: no-store and every call is recorded in the organisation's activity. Do not log it.

Path parameters

keyIdstringrequired
One of your keys.

Body

None. Send no body, or an empty JSON object.

Errors

Every error is { "error", "message", "detail"? } (Errors and references). Besides the codes any route can answer.

POST/v1/agents/me/keys/{keyId}/rotate
curl -X POST "https://api.rykloud.com/v1/agents/me/keys/$KEY_ID/rotate" \
  -H "Authorization: Bearer $RYKLOUD_TOKEN"