💬 Chat App
Update group chat name
This API endpoint empowers group administrators to seamlessly update the name of a group chat.
Group administrators can utilize this endpoint to enhance the clarity and context of their group conversations by modifying the group's name as needed.
patch/chat-app/chats/group/{chatId}
Request body
Example request
{
"name": "New friends"
}Response
Update group chat name
Example response
{
"data": {
"_id": "64ca9e166cabe93cce077e0a",
"admin": "64ca18038155dc11e68dfe83",
"createdAt": "2023-08-02T18:19:02.958Z",
"isGroupChat": true,
"name": "New friends",
"participants": [
{
"__v": 0,
"_id": "64c940d8ffe6c671f4d049cd",
"avatar": {
"_id": "64c940d8ffe6c671f4d049ce",
"localPath": "",
"url": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/601.jpg"
},
"createdAt": "2023-08-01T17:28:56.322Z",
"email": "vallie.tremblay15@hotmail.com",
"isEmailVerified": true,
"loginType": "EMAIL_PASSWORD",
"role": "ADMIN",
"updatedAt": "2023-08-01T19:00:03.310Z",
"username": "baylee_mante"
},
{
"__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:19:47.506Z"
},
"message": "Group chat name updated successfully",
"statusCode": 200,
"success": true
}