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
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number to retrieve (1-based). Values below 1 fall back to 1. |
limit | integer | 20 | Number 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
| Field | Type | Description |
|---|---|---|
total | integer | Total number of agents accessible by this key. |
limit | integer | Page size used for this response. |
offset | integer | Number of agents skipped before this page. |
currentPage | integer | The page returned. |
totalPages | integer | Total number of pages available. |
agents | array | List 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.