Delete Campaign
Delete a campaign by ID
MethodDELETE
/api/v1/campaigns/{campaignId}https://lumail.io/api/v1/campaigns/{campaignId}
Permanently delete a campaign from your organization. Only campaigns with DRAFT status can be deleted.
Response
- Success (200 OK) - Returns confirmation of deletion.
- Error (400 Bad Request) - Campaign is not in DRAFT status.
- Error (404 Not Found) - Campaign not found or doesn't belong to your organization.
- Error (401 Unauthorized) - Invalid or missing API token.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
campaignId | string | Required. The unique campaign ID |
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
deleted | boolean | Confirms the campaign was deleted |
campaignId | string | The ID of the deleted campaign |
Important Notes
- Only DRAFT campaigns can be deleted. Scheduled, sending, sent, or archived campaigns cannot be deleted via the API.
- This action is permanent. Deleted campaigns cannot be recovered.
- For campaigns you want to keep but hide, consider using the archive feature in the Lumail UI instead.
- Deleting a campaign does not affect any emails that have already been sent from that campaign.
Usage Example
Use this API endpoint to:
- Clean up unused draft campaigns
- Remove test campaigns
- Build campaign management interfaces with delete functionality
- Automate cleanup of old draft campaigns
Related Documentation
- List Campaigns - List all campaigns
- Create Campaign - Create a new campaign
- Get Campaign - Get details for a specific campaign
- Update Campaign - Update a campaign