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

# Get Agents

> Retrieve a list of all agents for your organization

<ApiMethod method="get" path="/get-agents">
  Retrieve a list of all voice AI agents associated with your organization. Returns agent details including configuration, status, and metadata.
</ApiMethod>

## Request

<ParamField query="organization_id" type="integer" required>
  Your organization ID
</ParamField>

<ParamField query="api_key" type="string" required>
  Your organization API key
</ParamField>

<ParamField query="status" type="string">
  Filter by agent status (active, draft, paused)
</ParamField>

<ParamField query="limit" type="integer" default="100">
  Maximum number of agents to return
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Number of records to skip for pagination
</ParamField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET 'https://www.tabbly.io/dashboard/agents/endpoints/get-agents?organization_id=244&api_key=your_api_key&status=active' \
  -H 'Content-Type: application/json'
  ```

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

  params = {
      'organization_id': 244,
      'api_key': 'your_api_key',
      'status': 'active'
  }

  response = requests.get(
      'https://www.tabbly.io/dashboard/agents/endpoints/get-agents',
      params=params
  )

  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const params = {
      organization_id: 244,
      api_key: 'your_api_key',
      status: 'active'
  };

  axios.get('https://www.tabbly.io/dashboard/agents/endpoints/get-agents', { params })
      .then(response => console.log(response.data))
      .catch(error => console.error(error));
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

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

<ResponseField name="total" type="integer">
  Total number of agents
</ResponseField>

### Agent Object

<ResponseField name="agent_id" type="integer">
  Unique identifier for the agent
</ResponseField>

<ResponseField name="agent_name" type="string">
  Name of the agent
</ResponseField>

<ResponseField name="agent_description" type="string">
  Description of the agent
</ResponseField>

<ResponseField name="status" type="string">
  Status of the agent (active, draft, paused)
</ResponseField>

<ResponseField name="voice_id" type="integer">
  ID of the voice used by the agent
</ResponseField>

<ResponseField name="language" type="string">
  Primary language code
</ResponseField>

<ResponseField name="created_at" type="string">
  Timestamp when the agent was created
</ResponseField>

<ResponseField name="updated_at" type="string">
  Timestamp when the agent was last updated
</ResponseField>

### Success Response (200 OK)

```json theme={null}
{
    "success": true,
    "agents": [
        {
            "agent_id": 33,
            "agent_name": "Customer Support Agent",
            "agent_description": "Handles customer support inquiries",
            "status": "active",
            "voice_id": 5,
            "language": "en",
            "created_at": "2025-01-01T10:00:00Z",
            "updated_at": "2025-01-15T14:30:00Z"
        }
    ],
    "total": 5
}
```

## Error Responses

<ResponseField name="400" type="object">
  Missing required fields
</ResponseField>

<ResponseField name="404" type="object">
  Organization not found
</ResponseField>

<ResponseField name="500" type="object">
  Server error
</ResponseField>
