devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
806 stars 247 forks source link

[FEATURE][NOWEB] - delete status #386

Closed sg957 closed 1 week ago

sg957 commented 1 week ago

When sending a status message, the ID of the message is not received in the response I need it to delete a status

patron:PRO

devlikepro commented 1 week ago

Added in 2024.6.7

https://waha.devlike.pro/docs/how-to/send-messages/#delete-status


Delete status

Here's how you can delete status message you previously sent.

When you send status - you'll get the response like below, save key.id (it's message id).

{
  "key": {
    "remoteJid": "status@broadcast",
    "fromMe": true,
    "id": "AAAAAAAAAAAAAAAAAAAAAA" // <===== key.id
  },
  "message": {
    ...
  }
}

Then call

POST /api/{session}/status/delete

with payload

{
  // remember to include YOUR OWN id here to remove it from your account as well
  "contacts": [ 
        "11111111111@c.us",
        "22222222222@c.us", 
        "33333333333@c.us" 
  ],
  "id": "AAAAAAAAAAAAAAAAAAAAAA" // <===== key.id from above reponse
}

It removes status from all contacts in the list.

👉 You need to include your own id in the contacts list, so it'll be deleted from your account as well.

patron:PRO