Blueticks
Scheduled Messages

Cancel scheduled message

Cancel a message that is still `pending` so it will not be sent.

The message is removed from the queue and a cancellation is recorded in its delivery log.

The response is the message as it now stands: the public status enum has no cancelled value, so it reads status: "failed" with failureReason: "cancelled by user".

  • 404 — no pending message with this id is owned by the caller (this includes a message that was already dispatched).
  • 400 — the message is past the cancellable window (its status is no longer pending).
  • 409 — the message was dispatched while the cancel was in flight; nothing was cancelled.

Requires messages:write. DELETE /v1/scheduled-messages/{id} is different: it hard-deletes the message in any status except in flight (delivered and failed messages included), returns 409 only while the message is in flight, and responds { id, deleted: true }.

Request

curl -X POST "https://api.blueticks.co/v1/scheduled-messages//cancel"
POST
/v1/scheduled-messages/{id}/cancel

Path Parameters

id*string

Response

Response Body

application/json

application/json