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

# Get Agent

> Retrieves the configuration and details for a specific AI agent. This includes basic information, active status, and metric configurations.



## OpenAPI

````yaml get /api/v1/agent
openapi: 3.0.3
info:
  title: Dialgen API
  description: >-
    Dialgen API allows you to programmatically initiate and monitor AI-powered
    voice calls, either one at a time or in high-volume batches.
  version: 1.0.0
  contact:
    name: Dialgen Support
    url: https://sa.dialgen.ai
servers:
  - url: https://sa.dialgen.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Operations related to AI agents
  - name: Calls
    description: Operations related to individual calls
  - name: Batches
    description: Operations related to batch campaigns
paths:
  /api/v1/agent:
    get:
      tags:
        - Agents
      summary: Get Agent
      description: >-
        Retrieves the configuration and details for a specific AI agent. This
        includes basic information, active status, and metric configurations.
      operationId: getAgent
      parameters:
        - name: agentId
          in: query
          description: The unique identifier of the agent
          required: true
          schema:
            type: string
            example: agent_clx123abc...
        - name: userId
          in: query
          description: The user ID owning the agent
          required: true
          schema:
            type: string
            example: user_clx456def...
      responses:
        '200':
          description: Agent details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
              example:
                id: agent_clx123abc...
                name: Customer Support Agent
                createdAt: '2025-10-01T10:00:00.000Z'
                updatedAt: '2025-10-05T14:30:00.000Z'
                type: OUTBOUND
                isActive: true
                basicDetails:
                  dialId: Dial2
                  voiceId: ''
                  agent_name: ''
                  voiceSpeed: 0.7
                  voiceGender: male
                  agentLanguage: en
                metricConfig:
                  enabled: true
                  customMetrics: []
                sipTrunkId: sip_789
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Agent:
      type: object
      properties:
        id:
          type: string
          description: Unique agent identifier
        name:
          type: string
          description: Agent name
        createdAt:
          type: string
          format: date-time
          description: Agent creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Agent last update timestamp
        type:
          type: string
          enum:
            - OUTBOUND
            - INBOUND
          description: Agent type
        isActive:
          type: boolean
          description: Whether the agent is active
        basicDetails:
          type: object
          properties:
            dialId:
              type: string
            voiceId:
              type: string
            agent_name:
              type: string
            voiceSpeed:
              type: number
            voiceGender:
              type: string
              enum:
                - male
                - female
            agentLanguage:
              type: string
        metricConfig:
          type: object
          properties:
            enabled:
              type: boolean
            customMetrics:
              type: array
              items:
                type: object
        sipTrunkId:
          type: string
          description: SIP trunk identifier
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        message:
          type: string
        details:
          type: object
  responses:
    BadRequest:
      description: Missing or invalid fields/parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bad Request
            message: Missing required parameter
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: Invalid or missing API key
    Forbidden:
      description: The provided userId does not match the API key owner
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
            message: Access denied
    NotFound:
      description: The requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not Found
            message: Resource not found
    InternalServerError:
      description: An unexpected server error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
            message: An unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token authentication. Obtain your API key from the Dialgen API
        Keys dashboard at https://sa.dialgen.ai/api-keys

````