SmsCancelMessage¶
POST sms/message/cancel
Cancels a message while it is still in the queue. A message already handed to the provider cannot be recalled — the answer says so instead of pretending it was stopped.
Use it for a scheduled campaign or a message waiting for a send window.
Access Control¶
Allowed roles: admin, leader, manager.
Request¶
POST https://{broker_domain}/sms/message/cancel
{
"smsId": 814,
"reason": "Campaign stopped by the client"
}
{
"command": "SmsCancelMessage",
"extID": "1",
"data": {
"smsId": 814,
"reason": "Campaign stopped by the client"
}
}
const res = await platform.SmsCancelMessage({
smsId: 814,
reason: "Campaign stopped by the client"
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
smsId |
int | Yes | Message to cancel |
reason |
string | No | Why it was cancelled, up to 512 characters; stored with the message |
Response Data¶
The cancelled message ends up in a final status with closedBy: "CRM", so reports can tell an operator cancellation from a provider failure.
{
"smsId": 814,
"status": "FAILED"
}
Errors¶
| Code | Error | Description |
|---|---|---|
404 |
SMS_NOT_FOUND |
Message not found in the brand |
409 |
SMS_NOT_CANCELLABLE |
The message has left the queue and cannot be cancelled |