Documentation Index

Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt

Use this file to discover all available pages before exploring further.

Join a Room

Prev Next
Post
/api/v1/rooms.join

Join a room of any type, including public channels, private groups, and discussions. Unlike the channels.join endpoint, which only joins public channels, this endpoint applies to all kinds of rooms.

Changelog

Version Description
8.6.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
Join by room ID
{
  "roomId": "ByehQjC44FwMeiLbX",
  "joinCode": "1234"
}
Join by room name
{
  "roomName": "general"
}
OneOf
object
object
roomId
string Required

The ID of the room to join. Provide either roomId or roomName.

ExampleByehQjC44FwMeiLbX
joinCode
string

The join code of the room. Rooms can be password-protected. In that case, users must enter the password for access. The join code isn't needed if the user has the join-without-join-code permission.

Example1234
object
object
roomName
string Required

The name of the room to join. Provide either roomId or roomName.

Examplegeneral
joinCode
string

The join code of the room. Rooms can be password-protected. In that case, users must enter the password for access. The join code isn't needed if the user has the join-without-join-code permission.

Example1234
Responses
200

OK

Example
{
  "room": {
    "_id": "ByehQjC44FwMeiLbX",
    "name": "general",
    "fname": "general",
    "t": "c",
    "msgs": 8,
    "usersCount": 2,
    "u": {
      "_id": "rocketchat.internal.admin.test",
      "username": "rocketchat.internal.admin.test"
    },
    "ts": "2026-01-16T12:00:04.783Z",
    "ro": false,
    "sysMes": true,
    "default": true,
    "_updatedAt": "2026-01-16T12:06:30.426Z"
  },
  "success": true
}
Expand All
object
room
object
_id
string
name
string
fname
string
t
string
msgs
integer
usersCount
integer
u
object
_id
string
username
string
ts
string
ro
boolean
default
boolean
sysMes
boolean
_updatedAt
string
success
boolean
400

Bad Request

Invalid params
{
  "success": false,
  "error": "Match error: Missing key 'roomId'",
  "errorType": "error-invalid-params"
}
Room not found
{
  "success": false,
  "error": "The required \"roomId\" or \"roomName\" param provided does not match any channel [error-room-not-found]",
  "errorType": "error-room-not-found"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

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