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

# Rotate a minted credential: mint a new key, revoke the old one



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml post /mcp-credentials/{id}/rotate
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /mcp-credentials/{id}/rotate:
    post:
      tags:
        - TykMCP
      summary: 'Rotate a minted credential: mint a new key, revoke the old one'
      parameters:
        - name: id
          in: path
          description: Credential ID
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tykmcp.MintedCredential'
components:
  schemas:
    tykmcp.MintedCredential:
      type: object
      properties:
        credential:
          $ref: '#/components/schemas/models.MCPCredentialResponse'
        key:
          type: string
        servers:
          type: array
          items:
            $ref: '#/components/schemas/tykmcp.AppMCPServerView'
        skipped:
          type: array
          items:
            $ref: '#/components/schemas/tykmcp.SkippedServer'
    models.MCPCredentialResponse:
      type: object
      properties:
        alias:
          type: string
        app_id:
          type: integer
        app_name:
          type: string
        applied_policy_ids:
          type: array
          items:
            type: string
        connection_id:
          type: integer
        connection_name:
          type: string
        created_at:
          type: string
        desired_policy_ids:
          type: array
          items:
            type: string
        drift:
          type: string
        drift_detail:
          type: string
        expires_at:
          type: string
        external_policy_ids:
          type: array
          items:
            type: string
        id:
          type: string
        key_hint:
          type: string
        last_error:
          type: string
        last_synced_at:
          type: string
        lock_version:
          type: integer
        minted_at:
          type: string
        minted_by_user_id:
          type: integer
        purpose:
          type: string
        revealed_at:
          type: string
        revealed_to_user_id:
          type: integer
        revoke_mode:
          type: string
        revoke_reason:
          type: string
        revoked_at:
          type: string
        revoked_by_user_id:
          type: integer
        status:
          type: string
        tyk_key_hash:
          type: string
        updated_at:
          type: string
    tykmcp.AppMCPServerView:
      type: object
      properties:
        auth_mode:
          type: string
        brokerable:
          type: boolean
        connection_id:
          type: integer
        connection_name:
          type: string
        endpoint_url:
          type: string
        endpoint_urls:
          type: object
          additionalProperties:
            type: string
        grant_kind:
          type: string
        grant_open:
          type: boolean
        header_name:
          type: string
        id:
          type: integer
        kind:
          type: string
        name:
          type: string
        prm:
          $ref: '#/components/schemas/models.MCPProtectedResourceMetadata'
        slug:
          type: string
    tykmcp.SkippedServer:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        reason:
          type: string
    models.MCPProtectedResourceMetadata:
      type: object
      properties:
        authorization_servers:
          type: array
          items:
            type: string
        auto_derive_scopes:
          type: boolean
        resource:
          type: string
        scopes_supported:
          type: array
          items:
            type: string
        url:
          type: string
          description: URL is the absolute metadata URL when the endpoint URL is known.
        well_known_path:
          type: string

````