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

# Rotate Agent Credentials

> Rotate dashboard password and/or API key after compromise (invalidates old secrets).



## OpenAPI

````yaml /openapi.json post /api/v1/agents/{agent_id}/credentials/rotate
openapi: 3.1.0
info:
  title: SeaOtter API
  description: >-
    SeaOtter control plane API — managed Hermes Agent hosting. Authenticate with
    a Clerk session JWT (web) or an org-scoped API key (`Authorization: Bearer
    so_…` from POST /api/v1/api-keys). Public developer docs:
    https://docs.seaotter.dev
  version: 1.0.0
servers:
  - url: https://api.seaotter.dev
    description: Production
  - url: https://seaotter-api-bpenevambq-uc.a.run.app
    description: Production (Cloud Run URL)
  - url: http://localhost:8000
    description: Local development
security: []
tags:
  - name: agents
    description: Provision and operate Hermes agents
  - name: billing
    description: Stripe plans and subscriptions
  - name: users
    description: Current user and control-plane API keys
  - name: organizations
    description: Active organization context
  - name: audit
    description: Organization audit log (Enterprise)
  - name: health
    description: Liveness probes
paths:
  /api/v1/agents/{agent_id}/credentials/rotate:
    post:
      tags:
        - agents
      summary: Rotate Agent Credentials
      description: >-
        Rotate dashboard password and/or API key after compromise (invalidates
        old secrets).
      operationId: >-
        rotate_agent_credentials_api_v1_agents__agent_id__credentials_rotate_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CredentialsRotate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentCredentialsOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CredentialsRotate:
      properties:
        rotate_dashboard_password:
          type: boolean
          title: Rotate Dashboard Password
          default: false
        rotate_api_key:
          type: boolean
          title: Rotate Api Key
          default: false
        username:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
            - type: 'null'
          title: Username
        password:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 8
            - type: 'null'
          title: Password
      type: object
      title: CredentialsRotate
      description: Rotate compromised Hermes credentials. At least one flag must be true.
    AgentCredentialsOut:
      properties:
        dashboard_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Username
        dashboard_password:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Password
        api_server_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Server Key
        dashboard_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Url
        api_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Url
        dashboard_handoff_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Dashboard Handoff Url
      type: object
      title: AgentCredentialsOut
      description: Sensitive Hermes credentials — only via authenticated reveal.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT or so_ API key
      description: >-
        Clerk session JWT for the web app, or a control-plane API key (`so_…`)
        from POST /api/v1/api-keys for programmatic / docs try-it use.

````