Get Agents
Retrieve a list of AI agents that the user has access to.Endpoint
Authentication
This endpoint requires an API key with thecan_read_agents
permission.
Response
Error Codes
Status Code | Error Code | Description |
---|---|---|
401 | authentication_required | No API key was provided |
401 | invalid_key | The API key is invalid or inactive |
403 | permission_denied | The API key doesn’t have the required permission |
500 | server_error | An unexpected server error occurred |
Example Request
Example Response
Response Properties
Property | Type | Description |
---|---|---|
id | integer | The database ID of the agent |
assistant_id | string | The klen assistant ID |
name | string | The name of the agent |
role | string | The role of the agent (inbound agent, outbound agent) |
phone_number | string | The phone number assigned to the agent (if any) |
minutes_used | number | Total minutes the agent has been used for calls |
total_calls | integer | Total number of calls the agent has handled |
model | string | The AI model used by the agent |
voice_id | string | The voice ID used by the agent |
can_make_calls | boolean | Whether the agent can make calls (has an assigned phone number) |
team_id | integer | The ID of the team the agent belongs to (if any) |
Access Control
This endpoint returns all agents that the authenticated user has access to. This includes:- Agents created by the user
- Agents belonging to teams that the user has access to