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 MethodURLRequires Auth

POST

api/v1/livechat/room.saveInfo

Body

KeyExample ValueDescription

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

KeyExample ValueDescription

_id*

rbAXPnMktTFbNpwtJ

The guest ID.

name

john

The name of the guest.

email

john.test@rocket.chat

The email of the guest.

phone

4478390282

The contact of the guest.

livechatData

"livechatData" :

{ "id1": "value1", "id2": "value2" }

Custom fields information.

roomData Object

KeyExample ValueDescription

_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.

{
    "status": "error",
    "message": "You must be logged in to do this."
}

Change Log

VersionDescription

5.3.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.