product:chat
Delete Users
Deletes users and optionally all their belongings asynchronously.
Sends events:
- channel.deleted
- user.deleted
post/users/delete
Request body
calls'soft' | 'hard'
Calls delete mode. Affected calls are those that include exactly two members, one of whom is the user being deleted.
- null or empty string - doesn't delete any calls
- soft - marks user's calls and their related data as deleted (soft-delete)
- hard - deletes user's calls and their data completely (hard-delete)
conversations'soft' | 'hard'
Conversation channels delete mode. Conversation channel is any channel which only has two members one of which is the user being deleted.
- null or empty string - doesn't delete any conversation channels
- soft - marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
- hard - deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
filesboolean
Delete user files.
- false or empty string - doesn't delete any files
- true - deletes all files uploaded by the user, including images and attachments.
messages'soft' | 'pruning' | 'hard'
Message delete mode.
- null or empty string - doesn't delete user messages
- soft - marks all user messages as deleted without removing any related message data
- pruning - marks all user messages as deleted, nullifies message information and removes some message data such as reactions and flags
- hard - deletes messages completely with all related information
new_call_owner_idstring
new_channel_owner_idstring
user'soft' | 'pruning' | 'hard'
User delete mode.
- soft - marks user as deleted and retains all user data
- pruning - marks user as deleted and nullifies user information
- hard - deletes user completely. Requires 'hard' option for messages and conversations as well
user_idsstring[] required
IDs of users to delete
Response
Successful response
durationstring required
Duration of the request in milliseconds
task_idstring required
ID of the task to delete users