Skip to content

MailerDeleteCampaign

DELETE mailer/campaign

Deletes a campaign. The emails it produced keep their campaignId, so MailerGetStats can still report on the rollout.

A running campaign must be cancelled first — deleting it mid-rollout would leave its queued emails with no owner.

Access Control

Allowed roles: admin, leader, within the brand of the caller.

Request

DELETE request
DELETE https://{broker_domain}/mailer/campaign?id=3
Authorization: <JWT_TOKEN>
{
  "command": "MailerDeleteCampaign",
  "extID": "1",
  "data": {
    "id": 3
  }
}
const res = await platform.MailerDeleteCampaign({
  id: 3
});

Request Data

Field Type Required Description
id int Yes Campaign id

Response Data

{
  "id": 3,
  "deleted": true,
  "message": "Campaign with ID 3 has been deleted"
}

Errors

Code Error Description
403 PERMISSION_DENIED The campaign belongs to another manager
404 NOT_FOUND Campaign not found in the brand
409 CAMPAIGN_IN_PROGRESS Cancel the campaign before deleting it