> ## 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.

# Cancel Batch Call

> Cancel a running or scheduled batch call campaign

Cancels a batch call campaign. All pending recipients are marked as skipped. Active calls are not interrupted.

<Note>
  Only batches in `draft`, `scheduled`, `running`, or `paused` status can be cancelled. Completed or already-cancelled batches will return an error.
</Note>

## Body Parameters

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

<ParamField body="batch_id" type="string" required>
  UUID of the batch to cancel.
</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": "cancel",
      "batch_id": "f1e2d3c4-5678-9012-3456-789012345678"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "message": "Batch cancelled"
  }
  ```
</ResponseExample>
