💬 Chat App
Create or get a one on one chat
This API endpoint enables a logged-in user to initiate a personalized one-on-one chat interaction with another user.
By providing correct receiverId, the API facilitates the creation of a private chat environment where participants can engage in direct and focused conversations.
post/chat-app/chats/c/{receiverId}
Response
Create or get a one on one chat
Example response
{
"data": {
"_id": "64ca9e056cabe93cce077e00",
"admin": "64ca18038155dc11e68dfe83",
"createdAt": "2023-08-02T18:18:45.161Z",
"name": "One on one chat",
"participants": [
{
"__v": 0,
"_id": "64c940d8ffe6c671f4d049d6",
"avatar": {
"_id": "64c940d8ffe6c671f4d049d7",
"localPath": "",
"url": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/516.jpg"
},
"createdAt": "2023-08-01T17:28:56.323Z",
"email": "neoma.kling@hotmail.com",
"isEmailVerified": true,
"loginType": "EMAIL_PASSWORD",
"role": "ADMIN",
"updatedAt": "2023-08-01T17:28:56.323Z",
"username": "pearline_abshire"
},
{
"__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:18:45.161Z"
},
"message": "Chat retrieved successfully",
"statusCode": 200,
"success": true
}