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

# Get Agent

> Return basic information about one accessible agent.

Returns the agent's ID, name, and owner ID, plus its country and business phone number when available. The API key must belong to the supplied user, and that user must have access to the agent.

This endpoint returns a compact agent record rather than the complete flow configuration.


## OpenAPI

````yaml POST /get-agent
openapi: 3.0.1
info:
  title: Phonely API
  description: API for Phonely services including agent management and call summaries
  version: 1.0.0
servers:
  - url: https://app.phonely.ai/api
security: []
paths:
  /get-agent:
    post:
      summary: Get agent information
      description: Retrieve agent information based on the provided user ID and agent ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AgentRequest:
      type: object
      required:
        - uid
        - agentId
      properties:
        uid:
          type: string
          description: User ID
        agentId:
          type: string
          description: Agent ID
    AgentResponse:
      type: object
      required:
        - uid
        - agentId
        - name
      properties:
        uid:
          type: string
          description: User ID
        agentId:
          type: string
          description: Agent ID
        name:
          type: string
          description: Agent name
        country:
          type: string
          description: Country code
          nullable: true
        businessPhoneNumber:
          type: string
          description: Business phone number
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error code or identifier
        message:
          type: string
          description: Detailed error message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Authorization

````

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