Developers » API methods » Messages » messages.deleteConversation
Messagesmessages.deleteConversation
Deletes private messages in a conversation.
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: messages.
This method can be called with a community token. Access rights required: messages.
Parameters
user_idUser ID.
string
peer_idDestination ID.

For user:
User ID, e.g. 12345.

For chat:
2000000000 + chat_id, e.g. 2000000001.

For community:
- community ID, e.g. -12345.

int (number), accessible for versions from 5.38
group_id
positive number
Show options for only old API versions
offsetOffset needed to return a specific subset of messages.
positive number, default 0, outdated option, only for versions before 5.100
countNumber of messages to delete.
NOTE: If the number of messages exceeds the maximum, the method shall be called several times.

positive number, maximum value 10000, outdated option, only for versions before 5.100
Result
Returns 1.
Errors
936Contact not found
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
5.100
Parameters limit, count and offset in method messages.deleteConversation are now obsolete.

If successful, the method wall.edit returns post_id Ś an edited post identifier.
5.81
messages.removeChatUser method takes new member_id (integer) parameter. New Bots Longpoll and Callback API event has been added.