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

# List Agents

## List Agents

Retrieve a list of agents belonging to the authenticated user.

<ParamField path="query" name="search" type="string" optional>
  Search term to filter agents by name
</ParamField>

<ParamField path="query" name="page_size" type="integer" optional default="30">
  Number of agents to return per page (1-100)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.example.com/api/v1/agents?search=voice&page_size=20" \
    -H "X-API-Key: your-api-key-here"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.example.com/api/v1/agents?search=voice&page_size=20', {
    method: 'GET',
    headers: {
      'X-API-Key': 'your-api-key-here'
    }
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'X-API-Key': 'your-api-key-here'
  }

  params = {
      'search': 'voice',
      'page_size': 20
  }

  response = requests.get(
      'https://api.example.com/api/v1/agents',
      headers=headers,
      params=params
  )

  data = response.json()
  ```
</RequestExample>

## Response

<ResponseField name="status" type="object">
  Response status information

  <ResponseField name="code" type="integer">
    HTTP status code (200)
  </ResponseField>

  <ResponseField name="message" type="string">
    Status message
  </ResponseField>
</ResponseField>

<ResponseField name="data" type="array">
  Array of agent objects

  <ResponseField name="id" type="string">
    Agent ID (numeric or ElevenLabs agent ID)
  </ResponseField>

  <ResponseField name="name" type="string">
    Agent name
  </ResponseField>

  <ResponseField name="tags" type="array">
    Array of tag strings
  </ResponseField>

  <ResponseField name="conversation_config" type="object">
    Agent conversation configuration
  </ResponseField>

  <ResponseField name="platform_settings" type="object">
    Platform-specific settings
  </ResponseField>

  <ResponseField name="published" type="boolean">
    Whether the agent is published
  </ResponseField>

  <ResponseField name="published_at" type="string" nullable>
    ISO 8601 timestamp when agent was published
  </ResponseField>

  <ResponseField name="elevenlabs_agent_id" type="string" nullable>
    Associated ElevenLabs agent ID
  </ResponseField>

  <ResponseField name="version" type="integer">
    Agent version number
  </ResponseField>

  <ResponseField name="phone_numbers" type="array">
    Array of associated phone number objects
  </ResponseField>

  <ResponseField name="created_at" type="string">
    ISO 8601 creation timestamp
  </ResponseField>

  <ResponseField name="updated_at" type="string">
    ISO 8601 last update timestamp
  </ResponseField>
</ResponseField>

<ResponseField name="total_count" type="integer">
  Total number of agents matching the query
</ResponseField>

<ResponseField name="has_more" type="boolean">
  Whether there are more results available
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": {
      "code": 200,
      "message": "Success"
    },
    "data": [
      {
        "id": "123",
        "name": "Customer Support Agent",
        "tags": ["support", "voice"],
        "conversation_config": {
          "temperature": 0.7,
          "model": "gpt-4"
        },
        "platform_settings": {},
        "published": true,
        "published_at": "2024-01-15T10:30:00Z",
        "elevenlabs_agent_id": "agent_abc123",
        "version": 1,
        "phone_numbers": [
          {
            "id": 1,
            "phone_number": "+1234567890",
            "provider": "elevenlabs",
            "elevenlabs_phone_number_id": "phone_xyz"
          }
        ],
        "user_id": 1,
        "user_email": "user@example.com",
        "created_at": "2024-01-10T08:00:00Z",
        "updated_at": "2024-01-15T10:30:00Z"
      }
    ],
    "total_count": 1,
    "has_more": false
  }
  ```
</ResponseExample>

## Error Responses

<ResponseField name="401" type="object">
  Unauthorized - Invalid or missing authentication
</ResponseField>

<ResponseField name="500" type="object">
  Internal server error
</ResponseField>
