> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magpipe.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Batch Calls

> List all batch call campaigns for the authenticated user

Returns a paginated list of batch call campaigns, ordered by creation date (newest first).

## Body Parameters

<ParamField body="action" type="string" required>
  Must be `list`
</ParamField>

<ParamField body="status" type="string">
  Filter by batch status. One of: `draft`, `scheduled`, `running`, `paused`, `completed`, `cancelled`, `failed`.
</ParamField>

<ParamField body="limit" type="integer" default="50">
  Maximum number of results to return.
</ParamField>

<ParamField body="offset" type="integer" default="0">
  Number of results to skip for pagination.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  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
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "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"
      }
    ]
  }
  ```
</ResponseExample>
