message_not_found — Message does not exist

HTTP 404
Not retryable

What the API returns

{
  "error": {
    "code": "message_not_found",
    "message": "The requested message does not exist.",
    "request_id": "req_01JRQ8F4X9N2K7YB3C5V6W8H0T"
  }
}

Every Wapito error is this one envelope. Branch on code, which is stable; message is written for people and can be reworded; details appears only when there is something specific to say; request_id is what to quote to support.

What it means

message_not_found is an HTTP 404 error from the Wapito WhatsApp API: message does not exist. The response message reads “The requested message does not exist.” It is not retryable: the same request fails again until you change it. 5 endpoints can raise it, GET /messages/{id} among them.

Why it happens

No message with that id exists in the chat you addressed. Message ids are scoped to a conversation, so a perfectly real id from one chat is unknown in another. The other common causes are a message that was deleted for everyone, a message that predates the linked session and was never synced, and an id that was reconstructed by hand instead of taken from the send response or from a webhook.

How to fix message_not_found

  1. Use the id exactly as it arrived in the send response or the webhook payload - never rebuild it from its parts.

  2. Pass the same chat the message belongs to; the same id in a different chat is a different message.

  3. If the message is older than the session, accept that it may never have been synced and fall back to your own record of it.

The same failure in other stacks

If you are moving from a library or a self-hosted gateway, this is the same failure under the name that stack gives it:

  • WAHA 404

Endpoints that raise it

Where you will meet it

Retry guidance

Do not retry as sent

The same request fails the same way until something changes: the body, the credential, the recipient or the state of the channel. Keep it off every retry loop, fix the cause above, and send a corrected request once.

Frequently asked questions

Can I react to a message that was sent before my channel existed?

Only if the engine synced it. A newly linked session receives a window of recent history, not the full archive, so older conversations may simply be absent. Reacting to anything you did not send or receive through the API is best treated as unreliable.

Why does an edit fail while the message is clearly on my phone?

WhatsApp only allows edits for a limited period after sending, and only for messages the linked number sent itself. Once that window closes the engine can no longer address the message, which surfaces here. Send a correction as a new message instead.

Related

Try it on your own number

Create a channel, link a WhatsApp number by QR or pairing code, and call the API in a couple of minutes. The Sandbox plan is free and needs no card.