Skip to main content
POST
/
batch-calls
curl -X POST "https://api.magpipe.ai/functions/v1/batch-calls" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "list",
    "limit": 10
  }'
{
  "batches": [
    {
      "id": "f1e2d3c4-5678-9012-3456-789012345678",
      "name": "Appointment Reminders",
      "status": "completed",
      "total_recipients": 150,
      "completed_count": 142,
      "failed_count": 8,
      "created_at": "2024-02-15T09:00:00.000Z",
      "completed_at": "2024-02-15T14:30:00.000Z"
    },
    {
      "id": "a2b3c4d5-6789-0123-4567-890123456789",
      "name": "Follow-up Campaign",
      "status": "scheduled",
      "total_recipients": 50,
      "completed_count": 0,
      "failed_count": 0,
      "created_at": "2024-02-14T16:00:00.000Z",
      "scheduled_at": "2024-02-16T10:00:00.000Z"
    }
  ]
}
Returns a paginated list of batch call campaigns, ordered by creation date (newest first).

Body Parameters

action
string
required
Must be list
status
string
Filter by batch status. One of: draft, scheduled, running, paused, completed, cancelled, failed.
limit
integer
default:"50"
Maximum number of results to return.
offset
integer
default:"0"
Number of results to skip for pagination.
curl -X POST "https://api.magpipe.ai/functions/v1/batch-calls" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "list",
    "limit": 10
  }'
{
  "batches": [
    {
      "id": "f1e2d3c4-5678-9012-3456-789012345678",
      "name": "Appointment Reminders",
      "status": "completed",
      "total_recipients": 150,
      "completed_count": 142,
      "failed_count": 8,
      "created_at": "2024-02-15T09:00:00.000Z",
      "completed_at": "2024-02-15T14:30:00.000Z"
    },
    {
      "id": "a2b3c4d5-6789-0123-4567-890123456789",
      "name": "Follow-up Campaign",
      "status": "scheduled",
      "total_recipients": 50,
      "completed_count": 0,
      "failed_count": 0,
      "created_at": "2024-02-14T16:00:00.000Z",
      "scheduled_at": "2024-02-16T10:00:00.000Z"
    }
  ]
}