MailerCancelCampaign¶
POST mailer/campaign/cancel
Stops a campaign and, by default, cancels the emails it queued that have not left the queue.
Cancelling is allowed even for a campaign that already reached COMPLETED: the rollout can
be finished while thousands of its emails still sit in the queue waiting for a send window,
and the operator needs a way to stop them.
Access Control¶
Allowed roles: admin, leader, within the brand of the caller.
Request¶
POST https://{broker_domain}/mailer/campaign/cancel
{
"id": 3,
"cancelQueued": true
}
{
"command": "MailerCancelCampaign",
"extID": "1",
"data": {
"id": 3,
"cancelQueued": true
}
}
const res = await platform.MailerCancelCampaign({
id: 3,
cancelQueued: true
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | Yes | Campaign id |
cancelQueued |
bool | No | true (default) also cancels the queued emails; false only stops the rollout |
Response Data¶
A campaign that had already finished keeps status: "COMPLETED" — the emails are cancelled, but the rollout history is not rewritten.
{
"id": 3,
"status": "CANCELLED",
"cancelledEmails": 428
}
Errors¶
| Code | Error | Description |
|---|---|---|
403 |
PERMISSION_DENIED |
The campaign belongs to another manager |
404 |
NOT_FOUND |
Campaign not found in the brand |