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

# Cancel Campaign

> Cancel a scheduled or in-flight campaign.

Cancels an upcoming scheduled campaign or halts in-flight queued batches via the Mailofly API.

### Path Parameters

**id** `string` *required*

The unique identifier of the campaign to cancel.

### Response

**data** `object`

**id** `string`

The campaign ID.

**status** `string`

The updated status (`cancelled`).

```bash cURL theme={null}
curl -X POST https://api.mailofly.com/campaigns/cmp_123/cancel \
  -H "Authorization: Bearer mf_live_your_api_key"
```

```json 200 OK theme={null}
{
  "data": {
    "id": "cmp_123",
    "status": "cancelled"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.