Skip to main content

Cancel Campaign

Cancel a campaign that is scheduled, queued, or actively sending.

Endpoint

POST /push/campaigns/{id}/cancel

Returns: 200 OK

Path Parameters

ParameterTypeDescription
idstringCampaign ID

Headers

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes

Which campaigns can be cancelled

StatusCancellable
ScheduledYes
QueuedYes
SendingYes — remaining batches stop
DraftNo — it was never sent; delete it instead
Sent, Failed, CancelledNo — already terminal
Cancelling mid-send does not recall what already went

Cancelling a Sending campaign stops the batches that have not started yet. Notifications already handed to FCM or the browser's push service cannot be recalled — they will still arrive.

Cancel as a way to stop the rest, not to undo the beginning.


Response

The cancelled campaign, with status: "Cancelled".


Examples

curl -X POST "https://api.arsel.sa/v1/push/campaigns/0192a1b2-c3d4-7e5f-9000-abcdef123456/cancel" \
-H "Authorization: Bearer be_your_api_key"

Error Responses

{
"status_code": 400,
"name": "bad_request",
"message": "Cannot cancel a campaign with status \"Sent\""
}