Campaigns

Cancel a scheduled or sending campaign

POST
/api/campaigns/{id}/cancel

Explicit cancel endpoint. A scheduled campaign is marked cancelled and its reserved SMS quota is released. A sending campaign (including a segmented campaign between its segments) is cancelled with a compare-and-set on its status: the bulk send workers stop at the next recipient, recipients already sent stay sent, the sends so far are committed to the quota and the rest of the reservation is released, and a contact the campaign created is deleted only while its recipient row is still pending. A campaign in any other status returns 400 Only scheduled or sending campaigns can be cancelled. A sending campaign that finishes before the cancel lands returns 400 The campaign finished sending before it could be cancelled.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/campaigns/string/cancel"
{  "success": true,  "message": "Campaign created",  "data": {    "_id": "665f1a0c0e0a4b001a2c9f10",    "name": "Q2 Lead Gen",    "status": "scheduled",    "scheduleDate": "2026-05-20T15:00:00.000Z"  }}