Deletes a campaign. Permission: `campaigns`.

## Path Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `campaignId` | string | **Required.** Campaign id. |

## Response Fields

| Field | Type | Description |
| ----- | ---- | ----------- |
| `object` | `"campaign"` | Discriminator. |
| `id` | string | Deleted campaign id. |
| `deleted` | `true` | Always `true` on success. |

## Errors

| Status | `name` | When |
| ------ | ------ | ---- |
| 401 | `missing_api_key` | Missing or invalid bearer token |
| 403 | `missing_permission` | Token lacks the `campaigns` permission |
| 404 | `not_found` | Unknown campaign id |

## Related

- [List Campaigns](/docs/api-reference/v2/campaigns-list)
- [SDK: lumail.campaigns.delete](/docs/sdk/v2/campaigns-delete)


## API Reference
**Method:** DELETE
**Endpoint:** /api/v2/campaigns/:campaignId

### SDK
```ts
import { Lumail } from "lumail";

const lumail = new Lumail({ apiKey: process.env.LUMAIL_API_KEY });
const { data, error } = await lumail.campaigns.delete("cmp_abc123");
if (error) {
  throw error;
}
console.log(data.deleted, data.id);
```

### cURL
```bash
curl -X DELETE https://lumail.io/api/v2/campaigns/cmp_abc123 \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

### JavaScript
```javascript
const response = await fetch(
  "https://lumail.io/api/v2/campaigns/cmp_abc123",
  {
    method: "DELETE",
    headers: {
      Authorization: "Bearer YOUR_API_TOKEN",
    },
  },
);
const data = await response.json();
```

### Success Response
```json
{
  "object": "campaign",
  "id": "cmp_abc123",
  "deleted": true
}
```

### Error Response
```json
{
  "name": "not_found",
  "message": "Campaign not found",
  "statusCode": 404
}
```
