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

# List agent versions

> Retrieve a paginated list of all versions for a specific agent, including draft and published versions.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/agent/{agent_id}/version
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/agent/{agent_id}/version:
    get:
      tags:
        - Agents
      summary: List agent versions
      description: >-
        Retrieve a paginated list of all versions for a specific agent,
        including draft and published versions.
      operationId: list_agent_version_v1_agent__agent_id__version_get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: After
        - name: before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Before
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Limit
        - name: order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Order
        - name: mode
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/AgentMode'
              - type: 'null'
            title: Mode
        - name: is_published
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Is Published
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_AgentResponseSchema_'
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: Missing required permissions to view agents
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '404':
          description: Agent Not Found
          content:
            application/json:
              example:
                status: error
                error_code: AGENT_NOT_FOUND
                message: Agent 550e8400-e29b-41d4-a716-446655440000 not found
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: 'Error: Internal Server Error'
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    AgentMode:
      type: string
      enum:
        - free
        - path
      title: AgentMode
      description: Enum for Agent Modes.
    PaginatedResponse_AgentResponseSchema_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/AgentResponseSchema'
          type: array
          title: Data
        first_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: First Id
        last_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Id
        has_more:
          type: boolean
          title: Has More
        current_page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Page
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Pages
      type: object
      required:
        - data
        - has_more
      title: PaginatedResponse[AgentResponseSchema]
    ErrorResponseSchema:
      properties:
        status:
          type: string
          title: Status
          description: Status of the response, always 'error' for error responses
          default: error
        error_code:
          type: string
          title: Error Code
          description: Machine-readable error code in SCREAMING_SNAKE_CASE format
          examples:
            - PROJECT_NOT_FOUND
            - INVALID_EMAIL
            - UNAUTHORIZED_ROLE
        message:
          type: string
          title: Message
          description: Human-readable error message with details
          examples:
            - Project with id 550e8400-e29b-41d4-a716-446655440000 not found
            - The email invalid@email is not valid
            - Insufficient permissions to perform this action
      type: object
      required:
        - error_code
        - message
      title: ErrorResponseSchema
      description: Standard error response format for all API errors.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentResponseSchema:
      properties:
        agent_id:
          type: string
          format: uuid
          title: Agent Id
          description: The unique identifier for the agent
        modified_at:
          type: string
          format: date-time
          title: Last Update
          description: The date and time when the agent was last updated
        created_at:
          type: string
          format: date-time
          title: Creation Date
          description: The date and time when the agent was created
        version_id:
          type: string
          format: uuid
          title: Version Id
          description: The version id of the agent
        version_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Version Name
          description: The version name of the agent
        version_number:
          type: integer
          title: Version Number
          description: The version number of the agent
        version_created_at:
          type: string
          format: date-time
          title: Version Creation Date
          description: The date and time when the version was created
        is_draft:
          type: boolean
          title: Is Draft
          description: Indicates if the agent is a draft version
          default: false
        is_published:
          type: boolean
          title: Is Published
          description: Indicates if the agent is published
          default: false
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
          description: The name of the agent
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description given to the agent
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
          description: The prompt given to the agent
        greeting:
          anyOf:
            - type: string
            - type: 'null'
          title: Greeting
          description: >-
            The greeting message said by the agent to the caller at the
            beginning of the call. If set, the agent will always speak first
            both in inbound and outbound calls
        time_before_start:
          anyOf:
            - type: number
            - type: 'null'
          title: Time Before Start
          description: The time in seconds before the agent starts to speak
        voice:
          $ref: '#/components/schemas/VoiceResponseSchema'
          title: Voice
          description: The voice object used by the agent
        voice_speed:
          type: number
          maximum: 1.2
          minimum: 0.8
          title: Voice Speed
          description: >-
            The speed of the voice used by the agent, beeing 1.0 the normal
            speed. Values lower than 1.0 will make the voice slower, while
            values higher than 1.0 will make the voice faster
          default: 1
        voice_temperature:
          type: number
          maximum: 1
          minimum: 0
          title: Voice Temperature
          description: >-
            Controls voice expressiveness. Higher values produce more
            emotional/expressive speech, lower values produce more
            stable/consistent speech.
          default: 0.5
        volume:
          type: integer
          maximum: 100
          minimum: 0
          title: Volume
          description: >-
            Controls the output volume of the agent's voice. 50 is the default
            (no change), 0 is silent, 100 is maximum gain.
          default: 50
        boosted_keywords:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Boosted Keywords
          description: >-
            he list of keywords that are boosted for the agent speech
            recognition. Use this to improve the agent's recognition of
            domain-specific terms. For example, `['bradycardia']`
        language:
          $ref: '#/components/schemas/AvailableLanguages'
          title: Language
          description: >-
            The language used by the agent. Use `multi` for the agent using both
            english and spanish in the same call (multi will expand to more
            languages in the future)
        max_reminder_count:
          type: integer
          minimum: 0
          title: Max Reminder Count
          description: >-
            The maximum number of reminders that can be sent to the caller. If
            not provided, the default value is 3. Set this value to 0 to disable
            reminders
          default: 3
        reminder_frequency_ms:
          type: integer
          title: Reminder Frequency
          description: >-
            The frequency in milliseconds to send reminders to the caller. If
            not provided, the default value is 7500.
          default: 7500
        reminder_messages:
          items:
            type: string
          type: array
          title: Reminder Messages
          description: >-
            The list of messages to send to the caller as reminders. If not
            provided, the default value is an empty list which makes the model
            to generate the reminder messages by itself. Please, note that when
            using an empty list, the `reminder_frequency_ms` can be a little bit
            higher than specified since it has to generate the messages
          default: []
        knowledge_base_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Knowledge Bases
          description: The list of knowledge bases available for the agent to use
          default: []
        knowledge_item_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Knowledge Items
          description: The list of knowledge items directly available for the agent to use
          default: []
        mode:
          $ref: '#/components/schemas/AgentMode'
          title: Agent Mode
          description: The mode of the agent. Can be 'free' or 'path'
        conversational_path_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Conversational Path Id
          description: 'The id of the conversational path used by the agent. '
        integrations:
          items:
            $ref: '#/components/schemas/IntegrationToolsResponse'
          type: array
          title: Integrations
          description: The list of integrations and their assigned tools for the agent
          default: []
        call_tools:
          items:
            oneOf:
              - $ref: '#/components/schemas/TransferCallToolSchema'
              - $ref: '#/components/schemas/HangUpToolSchema'
              - $ref: '#/components/schemas/DetectAnsweringMachineToolSchema'
            discriminator:
              propertyName: type
              mapping:
                detect_answering_machine:
                  $ref: '#/components/schemas/DetectAnsweringMachineToolSchema'
                hang_up:
                  $ref: '#/components/schemas/HangUpToolSchema'
                transfer_call:
                  $ref: '#/components/schemas/TransferCallToolSchema'
          type: array
          title: Call Tools
          description: The list of call-tools (built-in tools) assigned to the agent
          default: []
        dynamic_variables:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Dynamic Variables
          description: >-
            Agent-level dynamic variables for template interpolation. Overridden
            by call-level variables.
          default: {}
        background_audio:
          anyOf:
            - $ref: '#/components/schemas/BackgroundAudio'
            - type: 'null'
          title: Background Audio
          description: The background audio to be used in the calls that this agent handles
        pronunciation_dict:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Pronunciation Dictionary
          description: Custom pronunciation mappings using phonetic text substitution
        flow_ids:
          items:
            type: string
          type: array
          title: Flow IDs
          description: List of flow IDs assigned to the agent
          default: []
      type: object
      required:
        - agent_id
        - modified_at
        - created_at
        - version_id
        - version_number
        - version_created_at
        - voice
        - language
        - mode
      title: AgentResponseSchema
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VoiceResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Voice Id
          description: The unique identifier for the voice in Diga
        name:
          type: string
          title: Voice Name
          description: The name of the voice
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description given to the voice
        provider:
          $ref: '#/components/schemas/VoiceProvider'
          title: Provider
          description: The voice provider
        provider_voice_id:
          type: string
          title: Provider Voice Id
          description: The voice ID in the provider's system
        preview_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Preview URL
          description: A URL to a preview audio file for the voice
        gender:
          anyOf:
            - type: string
            - type: 'null'
          title: Gender
          description: The gender of the voice
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: The language of the voice
        accent:
          anyOf:
            - type: string
            - type: 'null'
          title: Accent
          description: The accent of the voice
        tags:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tags
          description: Voice tags (e.g. age, descriptive, use_case)
        is_favourite:
          type: boolean
          title: Is Favourite
          description: Whether the voice is a favourite for the current company
      type: object
      required:
        - id
        - name
        - provider
        - provider_voice_id
        - is_favourite
      title: VoiceResponseSchema
    AvailableLanguages:
      type: string
      enum:
        - es
        - en
        - multi
        - ar
        - be
        - bn
        - bs
        - bg
        - ca
        - hr
        - cs
        - da
        - nl
        - et
        - fi
        - nl-BE
        - fr
        - de
        - de-CH
        - el
        - he
        - hi
        - hu
        - id
        - it
        - ja
        - kn
        - ko
        - lv
        - lt
        - mk
        - ms
        - mr
        - 'no'
        - fa
        - pl
        - pt
        - ro
        - ru
        - sr
        - sk
        - sl
        - sv
        - tl
        - ta
        - te
        - tr
        - uk
        - ur
        - vi
      title: AvailableLanguages
    IntegrationToolsResponse:
      properties:
        integration_id:
          type: string
          format: uuid
          title: Integration Id
          description: The unique identifier for the integration
        integration_name:
          type: string
          title: Integration Name
          description: The name of the integration
        tool_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Tool Ids
          description: The list of tool IDs assigned from this integration
      type: object
      required:
        - integration_id
        - integration_name
        - tool_ids
      title: IntegrationToolsResponse
      description: Response schema for integration and its assigned tools.
    TransferCallToolSchema:
      properties:
        type:
          type: string
          const: transfer_call
          title: Call Tool Type
          description: Must be transfer_call
          default: transfer_call
        name:
          type: string
          title: Call Tool name
          description: The unique identifier for the call-tool
        target_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Number
          description: >-
            The phone number to which the call will be transferred. Here you can
            also include the extension if needed. For example, +1234567890#1234
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Description of how and when to use this tool. The agent can use this
            information to decide when to use the tool.
        transfer_type:
          type: string
          enum:
            - transfer
            - invite
          title: Transfer Type
          description: >-
            The type of transfer to perform: 'transfer' for a SIP-transfer, or
            'invite' for a SIP-invite.
          default: transfer
      type: object
      required:
        - name
      title: TransferCallToolSchema
      description: Settings schema for the transfer call-tool.
    HangUpToolSchema:
      properties:
        type:
          type: string
          const: hang_up
          title: Call Tool Type
          description: Must be hang_up
          default: hang_up
        name:
          type: string
          title: Call Tool name
          description: The unique identifier for the call-tool
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            The reason for hanging up the call. The agent can use this
            information to decide when to use the tool.
      type: object
      required:
        - name
      title: HangUpToolSchema
      description: Settings schema for the hang-up call-tool.
    DetectAnsweringMachineToolSchema:
      properties:
        type:
          type: string
          const: detect_answering_machine
          title: Call Tool Type
          description: Must be detect_answering_machine
          default: detect_answering_machine
        name:
          type: string
          title: Call Tool name
          description: The unique identifier for the call-tool
      type: object
      required:
        - name
      title: DetectAnsweringMachineToolSchema
      description: Settings schema for the detect answering machine call-tool.
    BackgroundAudio:
      type: string
      enum:
        - call_center
        - cafe
        - road_traffic
        - park
        - office
        - car_garage
      title: BackgroundAudio
    VoiceProvider:
      type: string
      enum:
        - elevenlabs
      title: VoiceProvider
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````