message

delete message by id

delete a message by id

post/instances/{id}/client/action/delete-message-by-id

Request

  • Base URL: https://waapi.app/api/v1
  • URL: https://waapi.app/api/v1/instances/{id}/client/action/delete-message-by-id
  • Auth: HTTP bearer

Path parameters

idinteger required

Instance ID

Request body

messageIdstring required

serialized messageId, fromMe_chatId_hash or for groups fromMe_groupId_messageHash_senderId

forEveryoneboolean

optional, delete message for all users or just for you, default: false

Example request

{
  "messageId": "<bool>_<xxxxx>@c.us>_<megssageHash>",
  "forEveryone": true
}

Response

Request reached the instance. data.status reports whether the action was carried out; on error data carries message and explanation.

status'success' | 'error'

Whether the request reached the instance. success here does not mean the action was carried out — that is reported by data.status, which is the authoritative one. A malformed input arrives as status: success with data.status: error.

Example response

{
  "data": {
    "status": "success",
    "data": {
      "messageId": "true_123456789@c.us_123abc456def890",
      "deleted": true
    }
  },
  "links": {
    "self": "https://waapi.app/api/v1/instances/1/client/action/delete-message-by-id"
  },
  "status": "success"
}

Changes

No recorded changes to this operation across all 1 revision of this API.