product:chat

Deletes users and optionally all their belongings asynchronously.

Sends events:

  • channel.deleted
  • user.deleted
post/users/delete

Request

  • Base URL
    https://chat.stream-io-api.com
  • URL
    https://chat.stream-io-api.com/users/delete
  • Auth
    • API key in header Authorization and API key in query parameter api_key and API key in header Stream-Auth-Type
    • or API key in query parameter api_key and API key in header Stream-Auth-Type

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' | 'keep'

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, unless user is 'hard', in which case it defaults to 'hard'
  • 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)
  • keep - doesn't delete any conversation channels. Use it with user 'hard', where null or empty string defaults to 'hard'
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 'hard' or 'keep' option for conversations
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

Changes

    • info

      added the new keep enum value to the request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status