---
title: "Join a Room"
slug: "join-a-room"
updated: 2026-07-07T08:12:18Z
published: 2026-07-07T08:12:18Z
canonical: "developer.rocket.chat/join-a-room"
---

> ## 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

Post/api/v1/rooms.join

Join a room of any type, including public channels, private groups, and discussions. Unlike the [channels.join](https://developer.rocket.chat/apidocs/join-a-channel) endpoint, which only joins public channels, this endpoint applies to all kinds of rooms.

### Changelog

| Version | Description |
| --- | --- |
| 8.6.0 | Added |

Header parametersX-Auth-TokenstringRequired

The `authToken` of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-IdstringRequired

The `userId` of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ

Body parameters<select class='api-response-data' aria-label='Media type'><option value='2745a1af-dce3-4f64-814a-f6d9d48c400d'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='4be5fd21-864e-4cef-9048-ee0980642900'>Join by room ID</option>
<option value='c57cbe77-6b00-48f9-99ad-da2e53a97770'>Join by room name</option>
</select>Join by room ID

```json
{
  "roomId": "ByehQjC44FwMeiLbX",
  "joinCode": "1234"
}
```

Join by room name

```json
{
  "roomName": "general"
}
```

OneOfobjectobjectroomIdstring    Required

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

ExampleByehQjC44FwMeiLbX
joinCodestring    

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

objectobjectroomNamestring    Required

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

Examplegeneral
joinCodestring    

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

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='49956e8d-5c4c-4acc-9096-729b7770b45c'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='412856a1-3d16-4d93-850f-e4015e3b3149'>Example</option>
</select>Example

```json
{
  "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 Allobject  roomobject  _idstring    
namestring    
fnamestring    
tstring    
msgsinteger    
usersCountinteger    
uobject  _idstring    
usernamestring    

tsstring    
roboolean    
defaultboolean    
sysMesboolean    
_updatedAtstring    

successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='a5cd30fb-1136-464f-870b-d082eb8692ed'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='2d2a3c23-0bbc-49da-8a28-7867fbf765ad'>Invalid params</option>
<option value='e080cf35-1654-4d93-974f-bf2a39a0822c'>Room not found</option>
</select>Invalid params

```json
{
  "success": false,
  "error": "Match error: Missing key 'roomId'",
  "errorType": "error-invalid-params"
}
```

Room not found

```json
{
  "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  successboolean    
errorstring    
errorTypestring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='601a37a0-b6d3-4a81-ad07-db2d51fb087a'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='bdcbae57-5a80-4470-9278-6368052974a2'>Authorization Error</option>
</select>Authorization Error

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

object  statusstring    
messagestring
