Skip to main content

Agents

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.

Authentication​

AuthorizationBearer

Authenticate server-side requests with a Fonema API key. Create one in the API keys section of the Dashboard and send it in the Authorization header as Bearer <token>. Keep keys out of client-side code and public repositories.

Query parameters​

pageintegerOptionalDefaults to 1

Page number to retrieve (1-based). Values below 1 fall back to 1.

limitintegerOptionalDefaults to 20

Number of agents per page. Maximum 100.

Response​

totalinteger
Total number of agents accessible by this key.
limitinteger
Page size used for this response.
offsetinteger
Number of agents skipped before this page.
currentPageinteger
The page returned.
totalPagesinteger
Total number of pages available.
agentsarray
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.