WhatsApp Gateway
API referenceMessages

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.

DELETE
/api/v1/sessions/{session}/messages/{mid}

Authorization

AuthorizationBearer <token>

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

session*string

The WhatsApp session id used to issue the revoke. Must be a connected session your organization owns.

mid*string

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.

chat?string

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).

sender?string

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"  }}