> ## 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.

# List Deployments

> Every change of the agent's live version, newest first: each publish that
created a version and each rollback.



## OpenAPI

````yaml get /v1/agent/agents/{agent_id}/deployments
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}/deployments:
    get:
      tags:
        - Agents
      summary: List Deployments
      description: >-
        Every change of the agent's live version, newest first: each publish
        that

        created a version and each rollback. Use it to see what was live when,

        and who or what moved it (`source`: `console`, `api`, or `unknown` for

        changes from before deployments were recorded).


        Paginate with `cursor` (from `next_cursor`) or `page`; the two are
        mutually

        exclusive.
      parameters:
        - in: path
          name: agent_id
          description: ''
          required: true
          schema:
            title: Agent Id
            type: string
          deprecated: false
        - in: query
          name: cursor
          description: ''
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            title: Cursor
          deprecated: false
        - in: query
          name: page
          description: 1-based page number; mutually exclusive with cursor.
          required: false
          schema:
            anyOf:
              - minimum: 1
                type: integer
              - type: 'null'
            default: null
            title: Page
          deprecated: false
        - in: query
          name: include_total
          description: ''
          required: false
          schema:
            default: false
            title: Include Total
            type: boolean
          deprecated: false
        - in: query
          name: page_size
          description: ''
          required: false
          schema:
            default: 30
            maximum: 100
            minimum: 1
            title: Page Size
            type: integer
          deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  deployments:
                    items:
                      $ref: '#/components/schemas/PublicAgentDeployment'
                    title: Deployments
                    type: array
                  has_more:
                    title: Has More
                    type: boolean
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Next Cursor
                  total:
                    anyOf:
                      - type: integer
                      - type: 'null'
                    default: null
                    title: Total
                required:
                  - deployments
                  - has_more
                type: object
        '400':
          description: Bad request syntax or unsupported method
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                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
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                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
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '503':
          description: The server cannot process the request due to a high load
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: bash
          label: List Deployments
          source: |-
            curl --request GET \
              --url 'https://api.fish.audio/v1/agent/agents/<agent-id>/deployments?page_size=10' \
              --header 'Authorization: Bearer <token>'
components:
  schemas:
    PublicAgentDeployment:
      description: One change of the live version.
      properties:
        deployment_id:
          title: Deployment Id
          type: string
        action:
          description: >-
            `publish`: a published draft became a new version and went live.
            `rollback`: the live version moved to an existing version.
          enum:
            - publish
            - rollback
          title: Action
          type: string
        version_number:
          description: The version that went live.
          title: Version Number
          type: integer
        previous_version_number:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The version that was live before; null on the first publish.
          title: Previous Version Number
        source:
          description: >-
            Where the change was made. `unknown` marks changes from before
            deployments were recorded.
          enum:
            - console
            - api
            - unknown
          title: Source
          type: string
        reason:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The `reason` given on a rollback; null otherwise.
          title: Reason
        created_at:
          format: date-time
          title: Created At
          type: string
      required:
        - deployment_id
        - action
        - version_number
        - source
        - created_at
      title: PublicAgentDeployment
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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