keys

Rotate an API key's secret in place, within the caller's organization.

Requires master key authentication.

Generates a new secret for the same key row (id, user, name, expiry, and metadata are preserved) and returns the new raw key once, using the same response shape as key creation. The previous secret stops authenticating immediately; there is no grace window.

post/api/v1/keys/{key_id}/rotate

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Path parameters

key_idstring required

Response

Successful Response

allowed_modelsstring[] nullable required
capture_agent_telemetryboolean nullable required
created_atstring required
end_user_budget_idstring nullable required
end_user_budget_idsstring[] required
exclude_from_budgetboolean required
expires_atstring nullable required
idstring required
is_activeboolean required
is_service_keyboolean required
keystring required
key_namestring nullable required
key_prefixstring nullable required
key_suffixstring nullable required
metadataobject required
reject_user_mismatchboolean nullable required
user_idstring nullable required

Changes