API Reference
Delete campaign
DELETE /campaigns/:id — permanently delete a campaign.
DELETE
/campaigns/:idPermanently deletes a campaign. This cannot be undone. You can only delete campaigns in the draft or scheduled status; deleting a scheduled campaign also cancels its pending delivery so it will not be sent.
Path parameters
idstringrequiredThe campaign ID.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.campaigns.remove('8f5c2a1e-7b3d-4f9a-9c12-2e6d4a7b8c90');
console.log({ data, error });Response
{
"object": "campaign",
"id": "8f5c2a1e-7b3d-4f9a-9c12-2e6d4a7b8c90",
"deleted": true
}Errors:
not_found if the campaign does not exist or is not yours.