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}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/list-agents',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ is_active: true }),
}
);
const { agents, total } = await response.json();
console.log(`You have ${total} agents`);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/list-agents',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={'is_active': True}
)
data = response.json()
print(f"You have {data['total']} agents")
{
"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
}
Agents
List Agents
List all AI agents in your account
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}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/list-agents',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ is_active: true }),
}
);
const { agents, total } = await response.json();
console.log(`You have ${total} agents`);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/list-agents',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={'is_active': True}
)
data = response.json()
print(f"You have {data['total']} agents")
{
"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
integer
default:50
Maximum agents to return. Max: 100.
integer
default:0
Number of records to skip for pagination.
boolean
Filter by active status.
string
Filter by type:
inbound, outbound, or both.Response
array
Array of agent objects.
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}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/list-agents',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ is_active: true }),
}
);
const { agents, total } = await response.json();
console.log(`You have ${total} agents`);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/list-agents',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={'is_active': True}
)
data = response.json()
print(f"You have {data['total']} agents")
{
"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
}
⌘I