Skip to main content
POST
/
v2
/
list-agents
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
});

const agents = await client.agent.list({
  filter_criteria: {
    channel: {
      op: 'eq',
      value: 'voice',
    },
  },
});

console.log(agents.items);
{
  "pagination_key": "<string>",
  "has_more": true,
  "items": [
    {
      "agent_id": "agent_1ffdb9717444d0e77346838911",
      "agent_name": "Jarvis",
      "channel": "voice",
      "user_modified_timestamp": 1703413636133,
      "tags": {}
    }
  ]
}
Use filter_criteria.channel with value: "voice" to list only voice agents. The response is paginated. Read agents from items, then pass the returned pagination_key on the next request while has_more is true.
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
});

const agents = await client.agent.list({
  filter_criteria: {
    channel: {
      op: 'eq',
      value: 'voice',
    },
  },
});

console.log(agents.items);

Authorizations

Authorization
string
header
required

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Query Parameters

limit
integer
default:50

Maximum number of items to return.

Required range: x <= 1000
sort_order
enum<string>
default:descending

Sort order for results.

Available options:
ascending,
descending
pagination_key
string

Pagination key for fetching the next page.

Body

application/json
filter_criteria
object

Filters for listing agents. All provided filters are connected with AND.

Response

Successfully retrieved agents.

pagination_key
string

Pagination key for the next page.

has_more
boolean

Whether more results are available.

items
object[]