GET
/
get-all-agents
Get all agents
curl --request GET \
  --url https://app.phonely.ai/api/get-all-agents
{
  "orgAgents": [
    {
      "name": "<string>",
      "orgId": "<string>",
      "agents": [
        {
          "id": "<string>",
          "name": "<string>",
          "businessPhoneNumber": "<string>",
          "orgId": "<string>",
          "cluster": "<string>"
        }
      ]
    }
  ]
}
Retrieves a comprehensive list of all agents across all organizations, organized by organization. This endpoint is typically used for administrative purposes.

Request

Method: GET
Endpoint: /api/get-all-agents
Headers:
  • Authorization: Bearer token (required for authentication)

Response

Success Response (200):
{
  "orgAgents": [
    {
      "name": "string",
      "orgId": "string",
      "agents": [
        {
          "id": "string",
          "name": "string",
          "businessPhoneNumber": "string",
          "orgId": "string",
          "cluster": "string"
        }
      ]
    }
  ]
}
Error Responses:
  • 401 Unauthorized: Invalid or missing authentication
  • 500 Internal Server Error: Server error

Example

curl -X GET https://app.phonely.ai/api/get-all-agents \
  -H "Authorization: Bearer your-token"

Notes

  • This endpoint requires proper authentication and authorization
  • Results are cached for 30 minutes for performance
  • HIPAA-enabled agents are filtered out for users with VIEWER role
  • Only non-draft agents are returned
  • Maximum duration is 5 minutes

Response

Successful response

orgAgents
object[]