RocketChat / RocketChat/Rocket.Chat
No way to create Livechat room for visitor via REST API
@KevLehman is already working on this.
Since Feb 13, 2026.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When using the realtime livechat API, sending a message using the sendMessageLivechat method will create a livechat room if the given room ID (rid) does not correspond to an existing one.
When using the REST API to send livechat messages, the livechat room pointed to by rid must already exist. However, there is no endpoint for creating livechat rooms via the REST API.
Steps to reproduce:
- Create a livechat visitor via the
livechat/visitorPOST endpoint - Attempt to send a message, passing a random room ID
- Recieve HTTP status 400 error with code
[invalid-room]
Expected behavior:
Sending a message via the REST API and via the Realtime API should behave identically - OR, if there should be a difference in the behavior between the two, it should be documented, and an endpoint must be added to allow creation of livechat rooms.
Actual behavior:
Recieve HTTP status 400 error with code [invalid-room]
Server Setup Information:
- Version of Rocket.Chat Server: 3.15.0
- Operating System: Docker container
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 12.22.1
- MongoDB Version: 4.0.25 / mmapv1 (oplog Enabled)
Relevant logs:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.