Remove User from Chat
Removes a user from a chat (leave chat). If the creator leaves, ownership transfers to the longest-tenured member.
Headers
- Type: stringAuthorizationrequired
JWT Bearer token. Format:
Bearer <JWT>
Body·
required
application/json
- Type: stringFormat: uuidchat
Id required - Type: stringFormat: uuidremove
User required
Responses
- 200
User removed from chat successfully.
- 400
User not in chat or not authorized to remove.
- application/json
Request Example for post/api/chat/removeUser
curl https://demo.api.whispchat.com/api/chat/removeUser \
--request POST \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"chatId": "550e8400-e29b-41d4-a716-446655440000",
"removeUser": "660e8400-e29b-41d4-a716-446655440001"
}'
No Body