> ## Documentation Index
> Fetch the complete documentation index at: https://edenai-feat-automate-documentation-tests.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate a Token's secret

> Rotate a key's secret in place: same key (name, id, budget, guardrail),
brand-new ``sk-eden`` value. The old value stops working immediately; the new
one is returned exactly once. Operates on real ``Token`` rows only — a legacy
primary/sandbox key (a JWT in a ``User`` column) is regenerated via
MigrateLegacyKey instead. Mutating, so the session access token is required —
no API key can rotate itself or others.



## OpenAPI

````yaml https://api.edenai.run/v2/info/splitted-schema/user/openapi.json post /user/custom_token/{name}/rotate/
openapi: 3.0.3
info:
  title: User Management
  version: '2.0'
  description: Your project description
servers:
  - url: https://api.edenai.run/v2
security: []
paths:
  /user/custom_token/{name}/rotate/:
    post:
      tags:
        - User Management
      summary: Rotate a Token's secret
      description: >-
        Rotate a key's secret in place: same key (name, id, budget, guardrail),

        brand-new ``sk-eden`` value. The old value stops working immediately;
        the new

        one is returned exactly once. Operates on real ``Token`` rows only — a
        legacy

        primary/sandbox key (a JWT in a ``User`` column) is regenerated via

        MigrateLegacyKey instead. Mutating, so the session access token is
        required —

        no API key can rotate itself or others.
      operationId: user_rotate_create
      parameters:
        - in: path
          name: name
          schema:
            type: string
          required: true
      responses:
        '200':
          description: No response body

````