Skip to main content
POST
/
list-agents
curl -X POST https://api.magpipe.ai/functions/v1/list-agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"is_active": true}'
{
  "agents": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Sarah - Receptionist",
      "agent_type": "both",
      "voice_provider": "elevenlabs",
      "is_active": true,
      "is_default": true,
      "created_at": "2024-01-10T10:00:00Z",
      "dynamic_variables": [
        {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "name": "caller_name",
          "description": "Full name of the caller",
          "var_type": "text",
          "enum_options": null,
          "created_at": "2024-01-10T10:00:00Z",
          "updated_at": "2024-01-10T10:00:00Z"
        }
      ]
    },
    {
      "id": "661f9511-f30c-52e5-b827-557766551111",
      "name": "Mike - Sales",
      "agent_type": "outbound",
      "voice_provider": "openai",
      "is_active": true,
      "is_default": false,
      "created_at": "2024-01-12T14:00:00Z",
      "dynamic_variables": []
    }
  ],
  "total": 2
}
Retrieve all AI agents configured in your account.

Request Body

limit
integer
default:50
Maximum agents to return. Max: 100.
offset
integer
default:0
Number of records to skip for pagination.
is_active
boolean
Filter by active status.
agent_type
string
Filter by type: inbound, outbound, or both.

Response

agents
array
Array of agent objects.
total
integer
Total number of agents in account.
curl -X POST https://api.magpipe.ai/functions/v1/list-agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"is_active": true}'
{
  "agents": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Sarah - Receptionist",
      "agent_type": "both",
      "voice_provider": "elevenlabs",
      "is_active": true,
      "is_default": true,
      "created_at": "2024-01-10T10:00:00Z",
      "dynamic_variables": [
        {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "name": "caller_name",
          "description": "Full name of the caller",
          "var_type": "text",
          "enum_options": null,
          "created_at": "2024-01-10T10:00:00Z",
          "updated_at": "2024-01-10T10:00:00Z"
        }
      ]
    },
    {
      "id": "661f9511-f30c-52e5-b827-557766551111",
      "name": "Mike - Sales",
      "agent_type": "outbound",
      "voice_provider": "openai",
      "is_active": true,
      "is_default": false,
      "created_at": "2024-01-12T14:00:00Z",
      "dynamic_variables": []
    }
  ],
  "total": 2
}