Revoke a message (delete for everyone)
Deletes the message identified by `mid` in the path **for everyone** in the chat — not just on your own device. Located by `chat` (and `sender`) in the body. Use the `sender` body field to revoke another participant's message (e.g. as a group admin); leave it empty to revoke your own message. This is a synchronous operation and returns **200** with a `SendResult`. WhatsApp enforces its own time/role limits on who may revoke what. ### Preconditions & errors - Requires the **`send`** capability. - **404 `not_found`** — the session or message does not exist or is not owned by your organization.
Send Authorization: Bearer <token>. The router accepts two kinds of token and tries each in turn: a frontend-minted login JWT (verified against the frontend JWKS; the person's org + role are read from it), or an api-key for a script/service (carrying a fixed set of gateway permissions). The bearerFormat: JWT label describes the person-login case.
In: header
Path Parameters
The WhatsApp session id used to issue the revoke. Must be a connected session your organization owns.
The WhatsApp message id (the per-message stable id assigned by WhatsApp) of the message to delete for everyone.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The JID of the chat the message lives in (e.g. "123...@s.whatsapp.net" for a direct chat or "123...@g.us" for a group).
The JID of the original sender of the message. Leave empty ("") when revoking your own message; set it to the author's JID when revoking another participant's message (e.g. as a group admin).
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/v1/sessions/01HZX.../messages/3EB0C431C26A1916E07A" \ -H "Content-Type: application/json" \ -d '{}'{ "mode": "string", "outboxId": "string", "replayed": true, "status": "string", "timestamp": 0, "waMessageId": "string"}{ "error": { "code": "not_found", "details": { "property1": null, "property2": null }, "message": "session not found" }}Edit a sent text message PATCH
Replaces the text body of a message you already sent, identified by `mid` in the path and located by `chat` in the body. **Constraints:** - Only **text** messages can be edited; editing media or other kinds is not supported. - The message must have been sent by this session. This is a synchronous send to WhatsApp and returns **200** with a `SendResult`. ### Preconditions & errors - Requires the **`send`** capability. - **400 `validation_error`** — missing/empty `text` or a non-text message. - **404 `not_found`** — the session or message does not exist or is not owned by your organization.
Forward a message to another chat POST
Forwards the message identified by `mid` (located by `chat`/`sender` in the body) to the destination chat named by `to` (a recipient JID). **Note (v1 behavior):** the forwarded message is sent as a **text reference** to the original, marked as forwarded — it does **not** copy the original body verbatim or re-upload media. A faithful copy is planned once the gateway can fetch a stored message by id. Returns **200** with a `SendResult` describing the newly sent (forwarded) message. ### Preconditions & errors - Requires the **`send`** capability. - **400 `validation_error`** — missing/empty `to`. - **404 `not_found`** — the session or source message does not exist or is not owned by your organization.