Message status

Message status

Tracking, cancel, and unknown decisions.

Track the message

GET /messages/{message_id}

HTTP 200
{
  "success": true,
  "message": {
    "message_id": "msg_…",
    "status": "sent",
    "to": "9665xxxxxxxx",
    "type": "text",
    "client_reference": "order-123",
    "provider_message_id": "…",
    "last_error_code": null,
    "created_at": "…",
    "updated_at": "…"
  },
  "request_id": "…"
}
queuedWaiting in the queue — can be cancelled.
sendingBeing handed over to WhatsApp.
sentAccepted by WhatsApp with a provider_message_id.
failedSending failed — reason in last_error_code (WORKER_DIED: sending broke on our side twice for the same message).
blockedNot sent because the session is not connected or WhatsApp is temporarily limiting the account — reason in last_error_code.
cancelledYou cancelled it before sending.
unknownThe connection dropped during hand-over and delivery is uncertain — needs your decision (Message status section). last_error_code: TIMEOUT or WORKER_DIED.

Message status ends at sent. Device delivery and read receipts arrive through the message.ack webhook event: ack = 1 server, 2 delivered to device, 3 read, 4 played (audio/video).

Cancel a message

POST /messages/{message_id}/cancel

HTTP 200 { "success": true, "message_id": "msg_…", "status": "cancelled" }
HTTP 409 { "code": "CANNOT_CANCEL", … }

Only while the message is queued and sending has not started; otherwise 409 CANNOT_CANCEL. Trial credit is returned on cancel.

Decide on unknown messages

POST /messages/{message_id}/unknown-decision

{ "decision": "sent" }      // treat as sent
{ "decision": "failed" }    // treat as failed
{ "decision": "resend", "confirm_duplicate": true }

HTTP 202 (resend)
{ "success": true, "decision": "resend", "new_message_id": "msg_…", "status": "queued" }

Check the chat on the phone, then choose: sent or failed to close the message, or resend to send a new copy. resend requires confirm_duplicate = true because the original may have arrived, and creates a new message_id. Subscribe to the message.unknown event to be notified immediately.