Links

Update Livechat Room

Edit a LiveChat room. Update the topic, tags, and other details of a Livechat room.
It requires the view-l-room permission.
HTTP Method
URL
Requires Auth
POST
api/v1/livechat/room.saveInfo
yes

Body

Key
Example Value
Description
guestData*
"guestData" : {
"_id": "rbAXPnMktTFbNpwtJ" }
An object of the updated guestdata.
roomData*
"roomData" : {
"_id": "nf52k8bpJ8y7oHmwk", "topic": "Hmm",
"tags": ["testtags"] }
An object of updated roomdata.
guestData Object
Key
Example Value
Description
_id*
rbAXPnMktTFbNpwtJ
The guest ID.
name
john
The name of the guest.
email
The email of the guest.
phone
4478390282
The contact of the guest.
livechatData
"livechatData" :
{ "id1": "value1", "id2": "value2" }
Custom fields information.
roomData Object
Key
Example Value
Description
_id*
rbAXPnMktTFbNpwtJ
The room ID.
topic
Test123
The topic of the room.
tags
["testtags"]
An array of tags to be associated with the room.
priorityId
5PMgshbQWsoHsYy2c
The priority ID of the room.
slaId
6417f67528384134ed600dc6
The SLA priority ID of the room.
livechatData
"livechatData" : { "id1": "value1", "id2": "value2"}
Custom fields information.

Example Body

{
"guestData": {
"_id": "rbAXPnMktTFbNpwtJ"
},
"roomData": {
"_id": "nf52k8bpJ8y7oHmwk",
"topic": "Hmm",
"tags": ["testtags"]
}
}

Example Call

curl --location 'http://localhost:3000/api/v1/livechat/room.saveInfo' \
--header 'x-auth-token: Wnb_e6wG4a74JiMxpSogmn9iP-K6wGk2F09sDRwLiLq' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ' \
--header 'Content-Type: application/json' \
--data '{
"guestData": {
"_id": "rbAXPnMktTFbNpwtJ"
},
"roomData": {
"_id": "nf52k8bpJ8y7oHmwk",
"topic": "Hmm",
"tags": ["testtags"]
}
}'

Example Response

Success

{
"success": true
}

Error

Any of the following errors can occur on the endpoint.
  • Authorization: Requires an authentication token for the request to be made.
  • Invalid Room: Occurs when the given _id in roomData object is invalid and doesn't belong to any room in the workspace.
Authorization
Invalid Room ID
{
"status": "error",
"message": "You must be logged in to do this."
}
{
"success": false,
"error": "error-invalid-room"
}

Change Log

Version
Description
5.3.0
Added
Last modified 19d ago
Deprecation for cloud services and apps is now extended to November 20, 2023. Rocket.Chat versions receive support for six months after release.