💬 Chat App
Remove participant from a group chat
This API endpoint enables group administrators to efficiently manage group dynamics by removing participants from a specific group chat.
This endpoint empowers administrators to maintain the composition and relevance of the group by seamlessly detaching selected participants, ensuring a streamlined and controlled group conversation environment.
delete/chat-app/chats/group/{chatId}/{participantId}
Response
Remove participant from a group chat
Example response
{
"data": {
"_id": "64ca9e166cabe93cce077e0a",
"admin": "64ca18038155dc11e68dfe83",
"createdAt": "2023-08-02T18:19:02.958Z",
"isGroupChat": true,
"name": "New friends",
"participants": [
{
"__v": 0,
"_id": "64c940d8ffe6c671f4d049d0",
"avatar": {
"_id": "64c940d8ffe6c671f4d049d1",
"localPath": "",
"url": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/1247.jpg"
},
"createdAt": "2023-08-01T17:28:56.322Z",
"email": "vanessa_ondricka81@hotmail.com",
"isEmailVerified": true,
"loginType": "EMAIL_PASSWORD",
"role": "USER",
"updatedAt": "2023-08-01T19:00:13.101Z",
"username": "walton_halvorson"
},
{
"__v": 0,
"_id": "64ca18038155dc11e68dfe83",
"avatar": {
"_id": "64ca18038155dc11e68dfe82",
"localPath": "",
"url": "https://via.placeholder.com/200x200.png"
},
"createdAt": "2023-08-02T08:46:59.711Z",
"email": "john.doe@gmail.com",
"isEmailVerified": false,
"loginType": "EMAIL_PASSWORD",
"role": "ADMIN",
"updatedAt": "2023-08-02T17:35:38.049Z",
"username": "doejohn"
}
],
"updatedAt": "2023-08-02T18:20:56.407Z"
},
"message": "Participant removed successfully",
"statusCode": 200,
"success": true
}