Skip to content

Message cannot be canceled

Resources / message-not-cancellable

The message is already canceled or is not in a state that allows cancellation.

Item status 409
  1. Read the current message status from history.
  2. Cancel only a scheduled message that is waiting to be sent.
  3. If the message has already been canceled, do not retry cancellation for that ID.
Response headers
HTTP/1.1 200 OK
Content-Type: application/json
Content-Language: en-US
Example API response
[
{
"id": 123,
"status": 409,
"error": {
"type": "https://api.szybkisms.pl/problems/message-not-cancellable/",
"status": 409,
"title": "Message Cannot Be Canceled",
"detail": "This message can no longer be canceled.",
"code": "409-2",
"instance": "/rest-sandbox/messages/123"
}
}
]

code is a diagnostic code for support. instance provides the request path. The example uses the current API identifiers.

2 situations
Item status 409Batch item · HTTP 200Link ↗

This message can no longer be canceled.

Read the current message status; only a scheduled message can be canceled.

DELETE /rest-sandbox/messages/{ids}DELETE /rest/messages/{ids}
Item status 409Batch item · HTTP 200Link ↗

This message cannot be canceled again.

The message is already canceled. Do not retry cancellation for this ID.

DELETE /rest-sandbox/messages/{ids}DELETE /rest/messages/{ids}