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

# List Agents

> Retrieve a paginated list of all agents in your organization.

<Warning>
  **Legacy endpoint - deprecated.** Unversioned endpoints are scheduled for removal on **July 31, 2026**. Use the [`/v1` version](/docs/api-reference/v1/agents/list) for new integrations. This endpoint remains available for existing integrations until then.
</Warning>

Returns all agents in your organization, sorted by creation date (newest first). Use this to populate agent selection dropdowns in your dashboard, audit configurations across your team, or sync agent state into your own database.

## Query parameters

| Parameter | Description                             |
| --------- | --------------------------------------- |
| `page`    | Page number, starting from 1.           |
| `limit`   | Results per page (max 100, default 20). |
| `search`  | Filter agents by name (partial match).  |


## OpenAPI

````yaml GET /agents2
openapi: 3.0.0
info:
  title: DialNexa API
  description: >-
    Public REST API for the DialNexa voice AI platform. Versioned endpoints are
    under /v1; unversioned endpoints are legacy and deprecated.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: API Keys
  - name: Agent Functions
  - name: Agents V1
  - name: Agents2
  - name: Batch Calls
  - name: Batch Calls V1
  - name: Call Logs
  - name: Calls
  - name: Calls V1
  - name: Campaign Leads
  - name: Campaigns
  - name: External Webhooks
  - name: Knowledge Base
  - name: Knowledge Base V1
  - name: LLMs
  - name: LLMs V1
  - name: Languages
  - name: Languages V1
  - name: Organization Phone Numbers
  - name: Organization Phone Numbers V1
  - name: Phone Number Pricing
  - name: Phone Number Pricing V1
  - name: Transcribers
  - name: Transcribers V1
  - name: User Webhooks
  - name: User Webhooks V1
  - name: V1
  - name: Voices
  - name: Voices V1
  - name: Webcall
  - name: Workflow Leads
  - name: Workflow Leads V1
  - name: Workflows
  - name: Workflows V1
paths:
  /agents2:
    get:
      tags:
        - Agents2
      summary: Get all agents by organization ID (structured)
      description: >-
        **Legacy endpoint - deprecated, scheduled for removal on July 31,
        2026.** Use the `/v1` version for new integrations. 


        Deprecated - use /v1/agents instead. This parallel resource will be
        removed in a future version.
      operationId: Agents2Controller_findAllByOrganizationId
      parameters:
        - name: x-organization-id
          in: header
          description: RSA encrypted organization ID (base64 format)
          required: true
          schema:
            type: string
            example: BASE64_ENCRYPTED_ORG_ID_HERE
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Agents2VersionResponseDto'
      deprecated: true
components:
  schemas:
    Agents2VersionResponseDto:
      type: object
      properties:
        number:
          type: number
          example: 0
        is_published:
          type: boolean
          example: false
        llm:
          $ref: '#/components/schemas/Agents2LlmDto'
        fallback_llm_enabled:
          type: boolean
          example: false
        llm_fallback_model:
          type: string
          example: llm_abc123xyz789ab
          nullable: true
        fall_back_llm_id:
          type: string
          example: llm_abc123xyz789ab
          nullable: true
        llm_fallback_delay_ms:
          type: number
          example: 500
          nullable: true
        transcriber_id:
          type: string
          example: tr0deepnova3xx
          nullable: true
        analysis:
          $ref: '#/components/schemas/Agents2AnalysisDto'
      required:
        - number
        - is_published
    Agents2LlmDto:
      type: object
      properties:
        id:
          type: string
          description: Primary LLM id (llms.id)
          example: llm_xxxxx
        settings:
          $ref: '#/components/schemas/Agents2LlmSettingsDto'
        fallback:
          $ref: '#/components/schemas/Agents2LlmFallbackDto'
    Agents2AnalysisDto:
      type: object
      properties:
        postcall_analysis:
          description: Post-call analysis fields to create on the agent version
          example:
            - field_name: customer_satisfaction
              field_type: NUMBER
              field_description: Customer satisfaction rating
          type: array
          items:
            $ref: '#/components/schemas/Agents2PostCallAnalysisItemDto'
    Agents2LlmSettingsDto:
      type: object
      properties:
        temperature:
          type: number
          description: LLM temperature (0.0 to 2.0)
          example: 0.1
        structured_output:
          type: boolean
          description: Enable structured JSON output
          example: true
    Agents2LlmFallbackDto:
      type: object
      properties:
        fallback_llm_enabled:
          type: boolean
          description: Enable fallback LLM for this agent version
          example: false
        llm_fallback_model:
          type: string
          description: ID (llms.id) of the LLM to use as fallback
          example: abc123xyz789ab
          nullable: true
        fall_back_llm_id:
          type: string
          description: Alias for llm_fallback_model (llms.id); llm_ prefix is stripped
          example: llm_abc123xyz789ab
          nullable: true
        llm_fallback_delay_ms:
          type: number
          description: Milliseconds to wait before triggering the fallback LLM
          example: 500
          nullable: true
    Agents2PostCallAnalysisItemDto:
      type: object
      properties:
        field_name:
          type: string
          example: customer_satisfaction
          description: Name of the PCA field
        field_description:
          type: string
          example: Customer satisfaction rating from 1 to 5
          description: Description of the PCA field
        field_type:
          type: string
          example: NUMBER
          description: Type of the PCA field
          enum:
            - TEXT
            - SELECTOR
            - BOOLEAN
            - NUMBER
        additional_fields:
          example:
            - positive
            - neutral
            - negative
          description: Selector choices (required for SELECTOR type)
          type: array
          items:
            type: string
      required:
        - field_name
        - field_type
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````