orvachat

Chats

Delete Chat

POST/api/v1/chat/deletechat

Delete a whole chat from this number.

Parameters

  • ChatstringRequired

    The chat id: a person (…@s.whatsapp.net or …@lid) or a group (…@g.us).

  • DeleteMediabooleanOptional

    Also delete the chat's photos and files. Default false.

  • LastMessageTimestampintegerOptional

    Time of the chat's last message (Unix seconds). Default now.

  • LastMessageIdstringOptional

    Id of the chat's last message. Send it with LastMessageTimestamp and LastMessageFromMe.

  • LastMessageFromMebooleanOptional

    true if you sent the chat's last message.

  • LastMessageSenderstringOptional

    Who sent the last message, only for groups when it was someone else.

Code Examples

cURL
curl -X POST "https://orvachat.com/api/v1/chat/deletechat" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Chat": "[email protected]",
  "DeleteMedia": false,
  "LastMessageTimestamp": 1700000000,
  "LastMessageId": "3EB0ABCDEF1234567890",
  "LastMessageFromMe": false
}'