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

> List basic information for a user's agents.

Returns compact records for the agents assigned directly to the supplied user. Each record includes the agent's ID, name, owner ID, country, and business phone number when available.

The `X-Authorization` API key must belong to the supplied user ID.


## OpenAPI

````yaml POST /get-agents
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-agents:
    post:
      summary: Get agents information
      description: Retrieve information for all agents associated with the user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAgentsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentInfo'
        '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:
    GetAgentsRequest:
      type: object
      required:
        - uid
      properties:
        uid:
          type: string
          description: User ID
    AgentInfo:
      type: object
      required:
        - uid
        - agentId
        - name
        - country
        - businessPhoneNumber
      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.