> ## 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 Channel > Join a public channel. ### Changelog | Version | Description | | ------- | ------------------------- | | 0.49.0 | Added | ## OpenAPI ````json POST /api/v1/channels.join { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/channels.join": { "post": { "tags": [ "Channels" ], "summary": "Join a Channel", "description": "Join a public channel.\n\n### Changelog\n| Version | Description |\n| ------- | ------------------------- |\n| 0.49.0 | Added |", "operationId": "post-api-v1-channels.join", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "roomId": { "type": "string", "description": "The channel ID." }, "joinCode": { "type": "string", "description": "The join code of the room. Channels can be password-protected. In that case, users must enter the password for access. See Channel information for details.\nThe join code isn't needed if the user has the `join-without-join-code` permission." } }, "required": [ "roomId" ] }, "examples": { "Example": { "value": { "roomId": "ByehQjC44FwMeiLbX", "joinCode": "1234" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "channel": { "type": "object", "properties": { "_id": { "type": "string" }, "fname": { "type": "string" }, "customFields": { "type": "object" }, "topic": { "type": "string" }, "broadcast": { "type": "boolean" }, "encrypted": { "type": "boolean" }, "name": { "type": "string" }, "t": { "type": "string" }, "msgs": { "type": "integer" }, "usersCount": { "type": "integer" }, "u": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" } } }, "ts": { "type": "string" }, "ro": { "type": "boolean" }, "default": { "type": "boolean" }, "sysMes": { "type": "boolean" }, "_updatedAt": { "type": "string" }, "lastMessage": { "type": "object", "properties": { "_id": { "type": "string" }, "rid": { "type": "string" }, "msg": { "type": "string" }, "ts": { "type": "string" }, "u": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" }, "name": { "type": "string" } } }, "_updatedAt": { "type": "string" }, "urls": { "type": "array", "items": { "type": "object" } }, "mentions": { "type": "array", "items": { "type": "object" } }, "channels": { "type": "array", "items": { "type": "object" } }, "md": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "value": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "value": { "type": "string" } } } } } } } } }, "lm": { "type": "string" } } }, "success": { "type": "boolean" } } }, "examples": { "Example": { "value": { "channel": { "_id": "nxXKHF2o2nzKYtFMM", "name": "test", "fname": "test", "t": "c", "msgs": 8, "usersCount": 2, "u": { "_id": "rocketchat.internal.admin.test", "username": "rocketchat.internal.admin.test" }, "customFields": {}, "broadcast": false, "encrypted": false, "ts": "2019-01-16T12:00:04.783Z", "ro": false, "sysMes": true, "default": false, "_updatedAt": "2019-01-16T12:06:30.426Z", "joinCodeRequired": true }, "success": true } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````