> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.voicebip.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.voicebip.com/_mcp/server.

# List agents

GET https://api.voicebip.com/v1/agents

Reference: https://docs.voicebip.com/api/agents/list-agents

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.voicebip.com` (Production, default)
- `https://sandbox.voicebip.com` (Sandbox)

## Request

### Query parameters

- `page_size` (integer, optional)
- `page_token` (string, optional)

## Response

### 200

Agent list

- `agents` (list of Agent, optional)
- `next_page_token` (string, optional)

## Errors

### 401 List Agents Request Unauthorized Error

Unauthorized

- `error_code` (enum, required)
  - Allowed values: `NOT_FOUND`, `ALREADY_EXISTS`, `INVALID_ARGUMENT`, `PERMISSION_DENIED`, `UNAUTHENTICATED`, `RATE_LIMITED`, `INTERNAL`, `UNAVAILABLE`, `QUOTA_EXCEEDED`, `NUMBER_UNAVAILABLE`, `CALL_FAILED`, `MESSAGE_FAILED`, `WEBHOOK_FAILED`, `AI_PROVIDER_ERROR`, `CALL_WINDOW_RESTRICTED`, `INVALID_REQUEST`, `INVALID_PLAN`, `NO_OP`, `NO_ACTIVE_SUBSCRIPTION`, `WORKSPACE_NOT_FOUND`, `TIER_SWITCH_UNSUPPORTED`, `INSUFFICIENT_BALANCE`, `WORKSPACE_BLOCKED`, `TIER_SWITCH_TOO_FREQUENT`, `CHANNEL_MISMATCH`, `OPT_OUT_ENFORCED`, `UPSTREAM_ERROR`, `REQUEST_BODY_TOO_LARGE`, `INVALID_BODY`, `AI_ERROR`, `ADMIN_DISABLED`, `STORE_UNAVAILABLE`, `ADMIN_DB_UNAVAILABLE`, `MISSING_ACTOR`, `ACTOR_TOO_LONG`, `MISSING_FIELD`, `INVALID_JSON`, `INVALID_AMOUNT`, `INVALID_INCLUDED_QTY`, `INVALID_CURRENCY`, `INVALID_PROFILE`, `INVALID_RESOURCE`, `INVALID_UNIT`, `INVALID_TIER`, `INVALID_EFFECTIVE_FROM`, `NOTES_TOO_LONG`, `INVALID_LIMIT`, `LIST_FAILED`, `UPSERT_FAILED`, `WORKSPACE_OVERRIDE_DISABLED`, `WORKSPACE_OVERRIDE_UNCONFIRMED`, `MISSING_WORKSPACE_HEADER`, `INVALID_PASSWORD`, `INVALID_EMAIL`, `INVALID_CREDENTIALS`, `EMAIL_EXISTS`, `EMAIL_NOT_VERIFIED`, `WEAK_PASSWORD`, `MISSING_COMPANY`, `MISSING_TOKEN`, `INVALID_TOKEN`, `TOO_MANY_ATTEMPTS`
- `message` (string, required)
- `request_id` (string, required)
- `documentation_url` (string, optional)

## Types

### Agent

- `agent_id` (string, optional)
- `workspace_id` (string, optional)
- `display_name` (string, optional)
- `description` (string, optional)
- `language` (string, optional)
- `ai_provider` (string, optional)
- `ai_model` (string, optional)
- `tts_voice` (string, optional) — The voice the agent speaks with. This is a `voice_id` from `GET /v1/voice/models` (e.g. `aura-asteria-en`). Null/absent means the platform-default voice.
- `system_prompt` (string, optional)
- `webhook_url` (string, optional)
- `greeting_text` (string, optional) — Custom greeting played via TTS when a call connects. If null, a default greeting is used.
- `greeting_audio_url` (string, optional) — The source URL of a hosted WAV played as the greeting instead of greeting_text. Set via UpdateAgent; validated and stored at save time. The system-managed storage key is never returned.
- `tool_definitions` (string, optional, default: []) — JSON array of OpenAI-compatible function/tool definitions. The AI can invoke these tools during voice calls. Built-in tools: hang_up, transfer_call, hold_call, resume_call. Custom tools are dispatched to the agent's webhook_url. Defaults to "[]".
- `shareable` (boolean, optional) — When true, enables a public 'try my agent' link for browser-based test calls.
- `knowledge_base_id` (string, optional) — Attached knowledge base (RAG). When set, hosted-AI turns answer from this KB's documents. Empty/absent = none.
- `call_window_start` (string, optional, default: 08:00) — Earliest permitted outbound call time (HH:MM, 24hr). CBN compliance.
- `call_window_end` (string, optional, default: 20:00) — Latest permitted outbound call time (HH:MM, 24hr). CBN compliance.
- `call_window_timezone` (string, optional, default: Africa/Lagos) — IANA timezone for call window evaluation.
- `pre_call_announcement` (string, optional) — CBN requirement: spoken announcement at start of call identifying the sponsoring institution.
- `recording_enabled` (boolean, optional) — Whether call recording is enabled for this agent. Workspace-level recording must also be enabled via POST /v1/workspace/recording for calls to be recorded.
- `consent_required` (boolean, optional) — When true (default), the caller hears a consent prompt before recording starts. When false, recording begins immediately. Only disable if you have an independent legal basis under NDPR.
- `screening_enabled` (boolean, optional) — BYOM only. When true, inbound calls trigger a synchronous `call.screening` webhook (to the agent's `webhook_url`) BEFORE the greeting so you can allow/reject the caller and optionally override the greeting. See the [BYOM guide](/guides/byom).
- `screening_fail_closed` (boolean, optional) — Screening failure policy. false (default) = fail-open (allow the call if the screening webhook errors/times out); true = fail-closed (reject).
- `status` (enum, optional)
  - Allowed values: `active`, `suspended`
- `created_at` (datetime, optional)
- `updated_at` (datetime, optional)

## Examples

**Response**

```json
{
  "agents": [
    {
      "agent_id": "agent_id",
      "workspace_id": "workspace_id",
      "display_name": "display_name",
      "description": "description",
      "language": "language",
      "ai_provider": "ai_provider",
      "ai_model": "ai_model",
      "tts_voice": "tts_voice",
      "system_prompt": "system_prompt",
      "webhook_url": "webhook_url",
      "greeting_text": "greeting_text",
      "greeting_audio_url": "greeting_audio_url",
      "tool_definitions": "[{\"type\":\"function\",\"function\":{\"name\":\"hang_up\",\"description\":\"End the call gracefully\",\"parameters\":{\"type\":\"object\",\"properties\":{},\"required\":[]}}}]",
      "shareable": true,
      "knowledge_base_id": "knowledge_base_id",
      "call_window_start": "08:00",
      "call_window_end": "20:00",
      "call_window_timezone": "Africa/Lagos",
      "pre_call_announcement": "pre_call_announcement",
      "recording_enabled": true,
      "consent_required": true,
      "screening_enabled": true,
      "screening_fail_closed": true,
      "status": "active",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z"
    }
  ],
  "next_page_token": "next_page_token"
}
```

**SDK Code**

```python
import requests

url = "https://api.voicebip.com/v1/agents"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.voicebip.com/v1/agents';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.voicebip.com/v1/agents"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.voicebip.com/v1/agents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.voicebip.com/v1/agents")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.voicebip.com/v1/agents', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.voicebip.com/v1/agents");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voicebip.com/v1/agents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```