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

# Publish Agent

> Freeze the current draft into an immutable version (version_number
auto-increments) and make it the live configuration for new sessions.



## OpenAPI

````yaml post /v1/agent/agents/{agent_id}/publish
openapi: 3.1.0
info:
  title: FishAudio OpenAPI
  version: '1'
servers:
  - description: Fish Audio API
    url: https://api.fish.audio
security: []
tags: []
paths:
  /v1/agent/agents/{agent_id}/publish:
    post:
      tags:
        - Agents
      summary: Publish Agent
      description: >-
        Freeze the current draft into an immutable version (version_number

        auto-increments) and make it the live configuration for new sessions.
        The

        body is optional; the title and description label the version for audit

        and rollback.
      parameters:
        - in: path
          name: agent_id
          description: ''
          required: true
          schema:
            title: Agent Id
            type: string
          deprecated: false
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                version_title:
                  type: string
                  maxLength: 120
                  description: Optional label shown in the version history.
                version_description:
                  type: string
                  maxLength: 2000
                  description: Optional longer note for audit and rollback context.
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  version_number:
                    title: Version Number
                    type: integer
                  version_title:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Version Title
                  version_description:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Version Description
                  config_hash:
                    title: Config Hash
                    type: string
                  published_at:
                    format: date-time
                    title: Published At
                    type: string
                required:
                  - version_number
                  - config_hash
                  - published_at
                type: object
        '401':
          description: No permission -- see authorization schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                required:
                  - status
                  - message
                type: object
        '404':
          description: Nothing matches the given URI
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                required:
                  - status
                  - message
                type: object
        '422':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                required:
                  - status
                  - message
                type: object
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: bash
          label: Publish
          source: |-
            curl --request POST \
              --url https://api.fish.audio/v1/agent/agents/<agent-id>/publish \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
                "version_title": "Tighter greeting"
              }'
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````