> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vocalistic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate Key



## OpenAPI

````yaml /api-reference/openapi.json post /v1/api-keys/{key_id}/rotate
openapi: 3.1.0
info:
  description: ''
  title: Vocalistic API
  version: 1.0.0
servers:
  - url: https://api.vocalistic.ai
security: []
paths:
  /v1/api-keys/{key_id}/rotate:
    post:
      tags:
        - API keys
      summary: Rotate Key
      operationId: apps_keys_api_rotate_key
      parameters:
        - in: path
          name: key_id
          required: true
          schema:
            maxLength: 64
            pattern: ^[A-Za-z0-9_\-]+$
            title: Key Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Rotate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyCreated'
          description: OK
      security:
        - UserSessionAuth: []
components:
  schemas:
    Rotate:
      properties:
        grace_seconds:
          default: 86400
          title: Grace Seconds
          type: integer
      title: Rotate
      type: object
    KeyCreated:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Expires At
        id:
          title: Id
          type: string
        key:
          title: Key
          type: string
        last_used_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Used At
        name:
          title: Name
          type: string
        prefix:
          title: Prefix
          type: string
        revoked_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Revoked At
        scopes:
          items:
            type: string
          title: Scopes
          type: array
      required:
        - id
        - name
        - prefix
        - scopes
        - expires_at
        - revoked_at
        - last_used_at
        - created_at
        - key
      title: KeyCreated
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.