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

# Get Agent Details

> Fetch one agent with versions and embedded configuration.

Read only
Fetch one agent by its `id`. The request is scoped to the authenticated organization automatically. The response includes the agent's versions, so this is the endpoint to call when you need the full configuration rather than a list summary.

## When to use this

* **Before an update**: fetch the current configuration and version numbers, then send only the changed fields to [Update Agent](https://dialnexa.com/docs/api-reference/v1/agents/update.md).
* **Config review**: confirm which version is published and what prompt, voice, and LLM it uses before routing production calls to it.
* **Syncing**: mirror agent configuration into your own admin UI or configuration store.

The response also carries `inbound_phone_numbers` and `outbound_phone_numbers`: the numbers linked to the agent, up to three per direction. Every version uses them. Manage them with [Attach Agent Phone Number](https://dialnexa.com/docs/api-reference/v1/agents/attach-phone-number.md) and [Detach Agent Phone Number](https://dialnexa.com/docs/api-reference/v1/agents/detach-phone-number.md). Responses can include additional fields not listed here; you can ignore them.

If the agent does not exist or belongs to another organization, the API returns `404 Not Found`. See [API errors](https://dialnexa.com/docs/api-reference/api-fundamentals.md#handle-dialnexa-api-errors) for the standard error format.


## OpenAPI

````yaml GET /v1/agents/{id}
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Organization Folders
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
  - name: Agent Evaluations
paths:
  /v1/agents/{id}:
    get:
      tags:
        - Agents
      summary: Get Agent Details
      description: >-
        Returns the agent with all versions. Each version includes
        `agent_functions`, `pronunciations`, and `postcall_analysis` embedded.
      operationId: getAgent
      parameters:
        - name: id
          required: true
          in: path
          description: Agent ID
          schema:
            example: agent_2g7Xy3tY53gRlp
            type: string
      responses:
        '200':
          description: Agent returned with all versions and embedded agent_functions.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                  - statusCode
                  - message
                  - data
                  - timestamp
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  error:
                    type: boolean
                    enum:
                      - false
                  statusCode:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Success
                  data:
                    allOf:
                      - $ref: '#/components/schemas/AgentRecord'
                      - type: object
                        properties:
                          inbound_phone_numbers:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: phn_abc123
                                phone_number:
                                  type: string
                                  example: '9876543210'
                                  description: The number without its country calling code.
                                country_iso:
                                  type: string
                                  example: '91'
                                  description: Country calling code.
                                nickname:
                                  type: string
                                  nullable: true
                                  description: Label set in the dashboard.
                                sip_trunk_enabled:
                                  type: boolean
                                linked_at:
                                  type: string
                                  format: date-time
                                  nullable: true
                                  description: >-
                                    When the number was linked to the agent,
                                    when known.
                              required:
                                - id
                                - phone_number
                                - country_iso
                                - nickname
                                - sip_trunk_enabled
                                - linked_at
                            description: Numbers that ring this agent. Up to 3.
                          outbound_phone_numbers:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: phn_abc123
                                phone_number:
                                  type: string
                                  example: '9876543210'
                                  description: The number without its country calling code.
                                country_iso:
                                  type: string
                                  example: '91'
                                  description: Country calling code.
                                nickname:
                                  type: string
                                  nullable: true
                                  description: Label set in the dashboard.
                                sip_trunk_enabled:
                                  type: boolean
                                linked_at:
                                  type: string
                                  format: date-time
                                  nullable: true
                                  description: >-
                                    When the number was linked to the agent,
                                    when known.
                              required:
                                - id
                                - phone_number
                                - country_iso
                                - nickname
                                - sip_trunk_enabled
                                - linked_at
                            description: Numbers the agent can call from. Up to 3.
                  timestamp:
                    type: string
                    format: date-time
              examples:
                success:
                  summary: Successful response
                  value:
                    success: true
                    error: false
                    statusCode: 200
                    message: Success
                    data:
                      id: agent_2g7Xy3tY53gRlp
                      folder_id: null
                      current_version_number: '0'
                      timezone: Asia/Kolkata
                      agent_type: Single_Prompt_Agent
                      pipeline_type: Cascaded
                      webhook_id: null
                      current_version:
                        agent_id: agent_2g7Xy3tY53gRlp
                        version_number: '0'
                        version_title: Version 0
                        title: Customer Support Agent
                        is_published: false
                        language_id: lang_en_in
                        voice_id: voice_abc123
                        llm_id: llm_A1B2C3D4E5F6G7
                        transcriber_id: trs_deepgram_nova_2
                        fallback_stt_enabled: true
                        stt_fallback_transcriber_id: trs_soniox
                      versions:
                        - agent_id: agent_2g7Xy3tY53gRlp
                          version_number: '0'
                          version_title: Version 0
                          title: Customer Support Agent
                          is_published: false
                          language_id: lang_en_in
                          voice_id: voice_abc123
                          llm_id: llm_A1B2C3D4E5F6G7
                          transcriber_id: trs_deepgram_nova_2
                          fallback_stt_enabled: true
                          stt_fallback_transcriber_id: trs_soniox
                      inbound_phone_numbers: []
                      outbound_phone_numbers:
                        - id: phn_abc123
                          phone_number: '9876543210'
                          country_iso: '91'
                          nickname: Support line
                          sip_trunk_enabled: false
                          linked_at: '2026-09-30T06:00:00.000Z'
                    timestamp: '2026-09-07T06:00:00.000Z'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 401 Unauthorized
                  value:
                    statusCode: 401
                    error: true
                    success: false
                    data: []
                    message: Invalid API key
                    errors: []
        '404':
          description: Agent not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 404 Not Found
                  value:
                    statusCode: 404
                    error: true
                    success: false
                    data: []
                    message: Agent with ID 2g7Xy3tY53gRlp not found
                    errors: []
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 500 Internal Server Error
                  value:
                    statusCode: 500
                    error: true
                    success: false
                    data: []
                    message: 'Failed to fetch agent: Internal server error'
                    errors: []
      security:
        - bearer: []
components:
  schemas:
    AgentRecord:
      type: object
      properties:
        id:
          type: string
          example: agent_2g7Xy3tY53gRlp
          description: Signed agent ID
        folder_id:
          type: string
          nullable: true
        current_version_number:
          type: string
          example: '3'
          description: >-
            Number of the current version. Serialized as a string (the column is
            a 64-bit integer).
        timezone:
          type: string
          nullable: true
        agent_type:
          type: string
          enum:
            - Single_Prompt_Agent
            - Conversational_Flow_Agent
            - IVR_Agent
        pipeline_type:
          type: string
          enum:
            - Cascaded
            - Speech_To_Speech
          nullable: true
        webhook_id:
          type: string
          nullable: true
        current_version:
          type: object
          nullable: true
          description: The version current_version_number points to.
          properties:
            agent_id:
              type: string
            version_number:
              type: string
              example: '1'
              description: >-
                Version number. Serialized as a string (the column is a 64-bit
                integer).
            version_title:
              type: string
              nullable: true
            title:
              type: string
              nullable: true
            description:
              type: string
              nullable: true
            llm_id:
              type: string
              nullable: true
            language_id:
              type: string
            voice_id:
              type: string
            voice_model_id:
              type: string
              nullable: true
            voice_speed:
              type: number
              nullable: true
            voice_temperature:
              type: number
              nullable: true
            voice_volume:
              type: number
              nullable: true
            voice_pitch:
              type: number
              nullable: true
            prompt_text:
              type: string
            system_prompt_text:
              type: string
              nullable: true
            conversation_start_type:
              type: string
            welcome_message:
              type: string
              nullable: true
            knowledge_base_ids:
              type: array
              items:
                type: string
              nullable: true
            kb_max_chunks:
              type: number
              nullable: true
            kb_min_score:
              type: number
              nullable: true
            is_published:
              type: boolean
            voicemail_detection:
              type: boolean
              nullable: true
            hangup_on_voicemail:
              type: boolean
              nullable: true
            voicemail_message:
              type: string
              nullable: true
            end_call_on_silence_sec:
              type: number
            max_call_duration_sec:
              type: number
            ring_duration_sec:
              type: number
            background_sound:
              type: string
              nullable: true
            ambient_noise:
              type: boolean
            background_sound_volume:
              type: number
            llm_temperature:
              type: number
            fallback_llm_enabled:
              type: boolean
              nullable: true
            llm_fallback_delay_ms:
              type: number
              nullable: true
            llm_fallback_model:
              type: string
              nullable: true
            fallback_stt_enabled:
              type: boolean
              nullable: true
            stt_fallback_wait_ms:
              type: number
              nullable: true
            stt_fallback_transcriber_id:
              type: string
              nullable: true
            predictive_preprocessing_enabled:
              type: boolean
              nullable: true
            prompt_caching_enabled:
              type: boolean
              nullable: true
            responsiveness:
              type: number
            interruption_sensitivity:
              type: number
            response_eagerness:
              type: number
            transcriber_id:
              type: string
              nullable: true
            denoising_mode:
              type: string
              nullable: true
            denoise_strength:
              type: number
              nullable: true
            boosted_keywords:
              type: string
              nullable: true
            boost_dynamic_variables:
              type: boolean
              nullable: true
            reminder_message_interval:
              type: number
              nullable: true
            reminder_message_content:
              type: string
              nullable: true
            default_dynamic_variables:
              nullable: true
            call_transfer_settings:
              nullable: true
            agent_identity:
              type: string
              nullable: true
            agent_background:
              type: string
              nullable: true
            node_positions:
              type: string
              nullable: true
            ivr_menu:
              type: object
              additionalProperties: true
              nullable: true
            audio_cache_enabled:
              type: boolean
              nullable: true
            language:
              type: object
              nullable: true
              additionalProperties: true
              description: >-
                Associated resource when configured. Included record; its own
                IDs are unprefixed.
            voice:
              type: object
              nullable: true
              additionalProperties: true
              description: >-
                Associated resource when configured. Included record; its own
                IDs are unprefixed.
            llm:
              type: object
              nullable: true
              additionalProperties: true
              description: >-
                Associated resource when configured. Included record; its own
                IDs are unprefixed.
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            end_call_on_hold_sec:
              type: integer
              nullable: true
              description: >-
                Seconds to wait in a confirmed hold before hanging up; null when
                disabled.
            language_default_message:
              type: string
              nullable: true
              description: Message spoken when the caller language is not supported.
            prompt_tokens:
              type: integer
              nullable: true
              description: Token count of the stored prompt, when computed.
            secondary_language_ids:
              type: array
              items:
                type: string
              description: Additional language IDs the version can switch to.
            speech_to_speech_english_accent:
              type: string
              enum:
                - indian
                - british
                - american
              description: >-
                Accent of the agent's English on Speech-to-Speech calls: indian
                (default), british or american.
            pronunciations:
              type: array
              description: Pronunciation overrides for this version.
              items:
                type: object
                properties:
                  id:
                    type: string
                  agent_id:
                    type: string
                    description: Unprefixed agent ID.
                  version_number:
                    type: string
                  original_word:
                    type: string
                  pronunciation_format:
                    type: string
                  phonetic_pronunciation:
                    type: string
                    nullable: true
                  is_deleted:
                    type: boolean
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
            postcall_analysis:
              type: array
              description: >-
                Post-call fields of this version. llm_id is the extraction LLM
                (null for the workspace default).
              items:
                type: object
                properties:
                  id:
                    type: string
                  field_name:
                    type: string
                  field_description:
                    type: string
                    nullable: true
                  field_type:
                    type: string
                    enum:
                      - TEXT
                      - SELECTOR
                      - BOOLEAN
                      - NUMBER
                      - DATETIME
                  agent_version_number:
                    type: string
                  additional_fields:
                    nullable: true
                  display_order:
                    type: integer
                    nullable: true
                  llm_id:
                    type: string
                    nullable: true
                    example: llm_A1B2C3D4E5F6G7
            agent_functions:
              type: array
              description: >-
                Functions of this version. Returned by Get Agent, create and
                update; not by List Agents. agent_id is unprefixed.
              items:
                type: object
                properties:
                  id:
                    type: string
                  agent_id:
                    type: string
                  version_number:
                    type: string
                  display_name:
                    type: string
                    nullable: true
                  type:
                    type: string
                  description:
                    type: string
                    nullable: true
                  config:
                    type: object
                    additionalProperties: true
                    nullable: true
        versions:
          type: array
          description: Every version, newest first.
          items:
            type: object
            properties:
              agent_id:
                type: string
              version_number:
                type: string
                example: '1'
                description: >-
                  Version number. Serialized as a string (the column is a 64-bit
                  integer).
              version_title:
                type: string
                nullable: true
              title:
                type: string
                nullable: true
              description:
                type: string
                nullable: true
              llm_id:
                type: string
                nullable: true
              language_id:
                type: string
              voice_id:
                type: string
              voice_model_id:
                type: string
                nullable: true
              voice_speed:
                type: number
                nullable: true
              voice_temperature:
                type: number
                nullable: true
              voice_volume:
                type: number
                nullable: true
              voice_pitch:
                type: number
                nullable: true
              prompt_text:
                type: string
              system_prompt_text:
                type: string
                nullable: true
              conversation_start_type:
                type: string
              welcome_message:
                type: string
                nullable: true
              knowledge_base_ids:
                type: array
                items:
                  type: string
                nullable: true
              kb_max_chunks:
                type: number
                nullable: true
              kb_min_score:
                type: number
                nullable: true
              is_published:
                type: boolean
              voicemail_detection:
                type: boolean
                nullable: true
              hangup_on_voicemail:
                type: boolean
                nullable: true
              voicemail_message:
                type: string
                nullable: true
              end_call_on_silence_sec:
                type: number
              max_call_duration_sec:
                type: number
              ring_duration_sec:
                type: number
              background_sound:
                type: string
                nullable: true
              ambient_noise:
                type: boolean
              background_sound_volume:
                type: number
              llm_temperature:
                type: number
              fallback_llm_enabled:
                type: boolean
                nullable: true
              llm_fallback_delay_ms:
                type: number
                nullable: true
              llm_fallback_model:
                type: string
                nullable: true
              fallback_stt_enabled:
                type: boolean
                nullable: true
              stt_fallback_wait_ms:
                type: number
                nullable: true
              stt_fallback_transcriber_id:
                type: string
                nullable: true
              predictive_preprocessing_enabled:
                type: boolean
                nullable: true
              prompt_caching_enabled:
                type: boolean
                nullable: true
              responsiveness:
                type: number
              interruption_sensitivity:
                type: number
              response_eagerness:
                type: number
              transcriber_id:
                type: string
                nullable: true
              denoising_mode:
                type: string
                nullable: true
              denoise_strength:
                type: number
                nullable: true
              boosted_keywords:
                type: string
                nullable: true
              boost_dynamic_variables:
                type: boolean
                nullable: true
              reminder_message_interval:
                type: number
                nullable: true
              reminder_message_content:
                type: string
                nullable: true
              default_dynamic_variables:
                nullable: true
              call_transfer_settings:
                nullable: true
              agent_identity:
                type: string
                nullable: true
              agent_background:
                type: string
                nullable: true
              node_positions:
                type: string
                nullable: true
              ivr_menu:
                type: object
                additionalProperties: true
                nullable: true
              audio_cache_enabled:
                type: boolean
                nullable: true
              language:
                type: object
                nullable: true
                additionalProperties: true
                description: >-
                  Associated resource when configured. Included record; its own
                  IDs are unprefixed.
              voice:
                type: object
                nullable: true
                additionalProperties: true
                description: >-
                  Associated resource when configured. Included record; its own
                  IDs are unprefixed.
              llm:
                type: object
                nullable: true
                additionalProperties: true
                description: >-
                  Associated resource when configured. Included record; its own
                  IDs are unprefixed.
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              end_call_on_hold_sec:
                type: integer
                nullable: true
                description: >-
                  Seconds to wait in a confirmed hold before hanging up; null
                  when disabled.
              language_default_message:
                type: string
                nullable: true
                description: Message spoken when the caller language is not supported.
              prompt_tokens:
                type: integer
                nullable: true
                description: Token count of the stored prompt, when computed.
              secondary_language_ids:
                type: array
                items:
                  type: string
                description: Additional language IDs the version can switch to.
              speech_to_speech_english_accent:
                type: string
                enum:
                  - indian
                  - british
                  - american
                description: >-
                  Accent of the agent's English on Speech-to-Speech calls:
                  indian (default), british or american.
              pronunciations:
                type: array
                description: Pronunciation overrides for this version.
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    agent_id:
                      type: string
                      description: Unprefixed agent ID.
                    version_number:
                      type: string
                    original_word:
                      type: string
                    pronunciation_format:
                      type: string
                    phonetic_pronunciation:
                      type: string
                      nullable: true
                    is_deleted:
                      type: boolean
                    createdAt:
                      type: string
                      format: date-time
                    updatedAt:
                      type: string
                      format: date-time
              postcall_analysis:
                type: array
                description: >-
                  Post-call fields of this version. llm_id is the extraction LLM
                  (null for the workspace default).
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    field_name:
                      type: string
                    field_description:
                      type: string
                      nullable: true
                    field_type:
                      type: string
                      enum:
                        - TEXT
                        - SELECTOR
                        - BOOLEAN
                        - NUMBER
                        - DATETIME
                    agent_version_number:
                      type: string
                    additional_fields:
                      nullable: true
                    display_order:
                      type: integer
                      nullable: true
                    llm_id:
                      type: string
                      nullable: true
                      example: llm_A1B2C3D4E5F6G7
              agent_functions:
                type: array
                description: >-
                  Functions of this version. Returned by Get Agent, create and
                  update; not by List Agents. agent_id is unprefixed.
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    agent_id:
                      type: string
                    version_number:
                      type: string
                    display_name:
                      type: string
                      nullable: true
                    type:
                      type: string
                    description:
                      type: string
                      nullable: true
                    config:
                      type: object
                      additionalProperties: true
                      nullable: true
        createdAt:
          type: string
          format: date-time
          description: When the agent was created.
        updatedAt:
          type: string
          format: date-time
          description: When the agent record was last changed.
        organization_id:
          type: string
          example: o14XKPP84rt22g
          description: Owning organization.
        is_deleted:
          type: boolean
          description: >-
            Whether the agent has been deleted. The list endpoint returns only
            agents where this is false.
        organization:
          type: object
          description: The owning organization record.
          properties:
            id:
              type: string
            title:
              type: string
            description:
              type: string
              nullable: true
            status:
              type: string
            org_code:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
      required:
        - id
        - agent_type
      description: An agent as stored. Returned by the list and get endpoints.
    ErrorResponse:
      type: object
      description: Error body on endpoints without response filtering.
      properties:
        statusCode:
          type: integer
          example: 404
        error:
          type: boolean
          enum:
            - true
        success:
          type: boolean
          enum:
            - false
        data:
          oneOf:
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable refusal code.
            - type: array
              items: {}
          description: >-
            For a coded refusal, an object with code and the details listed for
            that code. Otherwise an empty array.
        message:
          type: string
        errors:
          type: array
          items:
            type: string
          description: Validation messages for a 400. Empty for other errors.
        validation_errors:
          type: array
          description: >-
            Present when uploaded rows fail number validation (batch and
            workflow lead uploads): one group per distinct error.
          items:
            type: object
            properties:
              error:
                type: string
              rows:
                type: array
                items:
                  type: integer
                description: Row numbers with this error.
              phone_numbers:
                type: array
                items:
                  type: string
        invalid_row_count:
          type: integer
          description: 'Present with validation_errors: how many rows failed.'
      required:
        - statusCode
        - error
        - success
        - data
        - message
        - errors
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````

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