Delete Message
DELETE/api/v2/instance/:instanceId/chat/delete/message/:id
The route is responsible for deleting messages in a WhatsApp chat.
Request
Path Parameters
instanceId stringrequired
ID of the instance.
id stringrequired
Unique id [messageId] of the message within the chat.
Query Parameters
everyone string
Possible values: [true
, false
]
When set to true
, the message will be deleted for all users in the chat. If omitted or set to false
, the message will only be deleted for the user who made the request.
Responses
- 200
- 400
- 401
- 500
Success Deletion
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
statusOfDeletion stringrequired
Possible values: [everyone
, fromMe
]
deletion booleanrequired
message object
messageId stringrequired
keyId stringrequired
keyFromMe booleanrequired
keyRemoteJid stringrequired
keyParticipant stringrequired
pushName stringrequired
contentType stringrequired
isGroup booleanrequired
content objectrequired
source stringrequired
messageTimestamp stringrequired
createdAt date-timerequired
deletedAt date-timerequired
typeOfDeletion stringrequired
Possible values: [everyone
, forMe
]
MessageStatus object[]required
status stringrequired
Possible values: [DELIVERY_ACK
, PENDING
, PLAYED
, READ
]
dateTime date-timerequired
{
"statusOfDeletion": "everyone",
"deletion": true,
"message": {
"messageId": "string",
"keyId": "string",
"keyFromMe": true,
"keyRemoteJid": "string",
"keyParticipant": "string",
"pushName": "string",
"contentType": "string",
"isGroup": true,
"content": {},
"source": "string",
"messageTimestamp": "string",
"createdAt": "2024-04-14T14:11:05.701Z",
"deletedAt": "2024-04-14T14:11:05.701Z",
"typeOfDeletion": "everyone",
"MessageStatus": [
{
"status": "DELIVERY_ACK",
"dateTime": "2024-04-14T14:11:05.701Z"
}
]
}
}
BadRequestException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
UnauthorizedException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
InternalServerErrorException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
Loading...