Request
curl -X POST https://api.beaconbox.eu/api/v1/messages/v55favd767qu/retract \
-H "Authorization: Bearer $BEACONBOX_API_KEY"
-H "Idempotency-Key: 8f2b1c04-3d6a-4e55-9a12-77c0b4e9d100"client.messages.retract(message_id)$client->messages->retract($messageId)Path parameters
| Name | Type | Description |
|---|---|---|
public_id | string |
Response
Returns 200.
| Field | Type | Description |
|---|---|---|
id | string | |
status | "active" | "obsolete" | "retracted" | The message's status now. retracted unless a later push had already superseded it, in which case obsolete stands: a newer update really does replace it. |
retracted | boolean | True if this call is what withdrew it. False means it was already not live (you have retracted it before, or a later push superseded it), not that anything failed. |
sends_cancelled | integer | Queued SMS/WhatsApp sends this call called off. Zero means there was nothing left to stop: none was queued, they had already gone, or (in the narrow case where a worker had already charged for one) you were a moment too late. Retrying the same Idempotency-Key replays this number rather than recounting it. |
already_notified | boolean | Whether a nudge for this message had already reached a provider before you retracted. True means the recipient was told: the message is marked withdrawn in their inbox, but an email or text about it is already out and cannot be recalled. |
Errors
Failures are { "error_code": "..." } with a stable dotted code. See Errors for the codes worth branching on and the three outcomes that look like failures and are not.
This is a write, so it requires an Idempotency-Key header. A request without one is refused with 422. See Idempotency.
