curl -X POST https://api.magpipe.ai/functions/v1/list-calls \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 20,
"direction": "outbound",
"from_date": "2024-01-01T00:00:00Z"
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/list-calls',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
limit: 20,
direction: 'outbound',
from_date: '2024-01-01T00:00:00Z'
}),
}
);
const { calls, total } = await response.json();
console.log(`Found ${total} calls`);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/list-calls',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'limit': 20,
'direction': 'outbound',
'from_date': '2024-01-01T00:00:00Z'
}
)
data = response.json()
print(f"Found {data['total']} calls")
{
"calls": [
{
"id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef",
"agent_id": "550e8400-e29b-41d4-a716-446655440000",
"from_number": "+16045551234",
"to_number": "+14155551234",
"direction": "outbound",
"status": "completed",
"duration": 125,
"sentiment": "positive",
"call_summary": "Appointment confirmed for tomorrow at 2pm.",
"created_at": "2024-01-15T10:30:00Z"
}
],
"total": 156,
"has_more": true
}
Calls
List Calls
List all calls with filtering and pagination
POST
/
list-calls
curl -X POST https://api.magpipe.ai/functions/v1/list-calls \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 20,
"direction": "outbound",
"from_date": "2024-01-01T00:00:00Z"
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/list-calls',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
limit: 20,
direction: 'outbound',
from_date: '2024-01-01T00:00:00Z'
}),
}
);
const { calls, total } = await response.json();
console.log(`Found ${total} calls`);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/list-calls',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'limit': 20,
'direction': 'outbound',
'from_date': '2024-01-01T00:00:00Z'
}
)
data = response.json()
print(f"Found {data['total']} calls")
{
"calls": [
{
"id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef",
"agent_id": "550e8400-e29b-41d4-a716-446655440000",
"from_number": "+16045551234",
"to_number": "+14155551234",
"direction": "outbound",
"status": "completed",
"duration": 125,
"sentiment": "positive",
"call_summary": "Appointment confirmed for tomorrow at 2pm.",
"created_at": "2024-01-15T10:30:00Z"
}
],
"total": 156,
"has_more": true
}
Retrieve a paginated list of calls for your account. Supports filtering by date range, status, direction, and agent.
Request Body
Response
curl -X POST https://api.magpipe.ai/functions/v1/list-calls \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 20,
"direction": "outbound",
"from_date": "2024-01-01T00:00:00Z"
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/list-calls',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
limit: 20,
direction: 'outbound',
from_date: '2024-01-01T00:00:00Z'
}),
}
);
const { calls, total } = await response.json();
console.log(`Found ${total} calls`);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/list-calls',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'limit': 20,
'direction': 'outbound',
'from_date': '2024-01-01T00:00:00Z'
}
)
data = response.json()
print(f"Found {data['total']} calls")
{
"calls": [
{
"id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef",
"agent_id": "550e8400-e29b-41d4-a716-446655440000",
"from_number": "+16045551234",
"to_number": "+14155551234",
"direction": "outbound",
"status": "completed",
"duration": 125,
"sentiment": "positive",
"call_summary": "Appointment confirmed for tomorrow at 2pm.",
"created_at": "2024-01-15T10:30:00Z"
}
],
"total": 156,
"has_more": true
}