post/api-keys/{id}/rotate

Request

  • Base URL: https://api.useanima.sh/v1
  • URL: https://api.useanima.sh/v1/api-keys/{id}/rotate
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

idstring required

Unique identifier of the API key to rotate

Request body

object required

Request body for rotating an API key, which revokes the old key and issues a new one

Response

OK

idstring required

Unique identifier for the API key

orgIdstring required

Organization that owns this API key

agentIdstring nullable required

Agent this key is restricted to, null if unrestricted

namestring nullable required

Human-readable label for the API key

prefixstring required

Non-secret prefix of the key for identification

mode'LIVE' | 'TEST' required

Environment mode of the key

scopesstring[] required

Permission scopes granted to this key

revokedboolean required

Whether the key has been revoked

createdAtstring date-time required

ISO 8601 timestamp when the key was created

lastUsedAtstring date-time nullable required

ISO 8601 timestamp when the key was last used, null if never used

expiresAtstring date-time nullable required

ISO 8601 timestamp when the key expires, null if no expiration

createdBystring nullable required

User ID of the key creator, null if created by system

keystring required

Full secret API key value, only returned once at creation time

Changes

No recorded changes to this operation across all 1 revision of this API.