RocketChat / RocketChat/Rocket.Chat

No way to create Livechat room for visitor via REST API

Open
#22,558 2 comments 0 reactions 1 assignee View on GitHub

@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:
  1. Create a livechat visitor via the livechat/visitor POST endpoint
  2. Attempt to send a message, passing a random room ID
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.