Skip to main content

Cancel Scheduled Sends

Cancels scheduling for one or more messages that are still queued for a future send (QUEUED with a future deliverAt / deliverBy). The message row is not deleted: status becomes CANCELED, and Logs + trace history remain.
CANCELED is not FAILED and is not one of the delivery-error errorCode values listed in Log Error Codes.

Headers

  • Content-Type: application/json
  • x-api-key: ps_... (or x-api-key-id) — same key as POST /v1/messages/send

Body

string[]
required
Up to 100 message IDs per request.

Example

This endpoint uses DELETE with a JSON body; curl, fetch, and most HTTP clients support it.

Response (200)

  • Only still-schedulable messages appear in cancelled; others are listed in failed with a reason.
  • After canceling, GET /v1/messages/{messageId} returns "status": "CANCELED".
  • The Logs page supports the same flow via bulk selection of scheduled rows.

Common errors

  • 400 — body validation (e.g., missing messageIds, more than 100 IDs).
  • 401 — missing/invalid API key header.
  • 403 — e.g., a tenant-scoped key on this number-scoped endpoint.