Skip to main content

List agents

Returns the agents your API key can access. A key scoped to All agents returns every agent in your company; a key scoped to Specific agents returns only the agents linked to that key.

Endpoint

GET /v1/agents

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number to retrieve (1-based). Values below 1 fall back to 1.
limitinteger20Number of agents per page. Maximum 100.

Request example

curl -X GET "https://api.fonema.ai/v1/agents?page=1&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY_HERE"

Response

{
"offset": 0,
"total": 42,
"limit": 20,
"currentPage": 1,
"totalPages": 3,
"agents": [
{ "name": "Sales Agent", "slug": "sales-agent-ab12cd34" },
{ "name": "Support Agent", "slug": "support-agent-ef56gh78" }
]
}

Response fields

FieldTypeDescription
totalintegerTotal number of agents accessible by this key.
limitintegerPage size used for this response.
offsetintegerNumber of agents skipped before this page.
currentPageintegerThe page returned.
totalPagesintegerTotal number of pages available.
agentsarrayList of agents. Each item contains the agent name and its slug.
tip

Use the slug returned here as the identifier for Get agent and Edit agent requests.