Skip to main content

Cancel Campaign

Cancel a Scheduled, Queued, or Sending campaign. Messages that have already been handed off for delivery cannot be recalled — cancellation only prevents messages that have not yet been dispatched.

Endpoint

POST /sms/campaigns/:id/cancel

Returns: 200 OK

Prerequisites

Cancellation Limits

Cancellation only stops messages that have not yet been handed off for delivery. Recipients who already received the message will not be affected. Campaigns in Sent, Failed, or Cancelled status cannot be cancelled again.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe campaign ID.

Headers

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes

Response

{
"message": "Campaign cancelled"
}

Examples

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

Error Responses

{
"status_code": 400,
"name": "bad_request",
"message": "Campaign cannot be cancelled in its current status"
}