> ## 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. # Add Users to Channel > Add a user or bulk users to a channel. For a user to invite other users, they must match at least one of the following premises: - The user is part of a room of any type and has the `add-user-to-joined-room` permission. - The user is part of a public room `(t: 'c')` and has the `add-user-to-any-c-room` permission. - The user is part of a private room `(t: 'p')` and has the `add-user-to-any-p-room` permission. ### Changelog | Version | Description | | ------- | ------------------------- | | 0.48.0 | Added | ## OpenAPI ````json POST /api/v1/channels.invite { "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.invite": { "post": { "tags": [ "Channels" ], "summary": "Add Users to Channel", "description": "Add a user or bulk users to a channel.\n\nFor a user to invite other users, they must match at least one of the following premises:\n- The user is part of a room of any type and has the `add-user-to-joined-room` permission.\n- The user is part of a public room `(t: 'c')` and has the `add-user-to-any-c-room` permission.\n- The user is part of a private room `(t: 'p')` and has the `add-user-to-any-p-room` permission.\n\n### Changelog\n\n| Version | Description |\n| ------- | ------------------------- |\n| 0.48.0 | Added |", "operationId": "post-api-v1-channels.invite", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "properties": { "roomId": { "type": "string", "description": "The channel's ID.", "example": "nSYqWzZ4GsKTX4dyK" }, "userId": { "type": "string", "description": "The user id to be invited.", "example": "ByehQjC44FwMeiLbX" } }, "required": [ "roomId", "userId" ] }, { "type": "object", "properties": { "roomId": { "type": "string", "description": "The channel's id", "example": "nSYqWzZ4GsKTX4dyK" }, "userIds": { "type": "array", "description": "An array of the userId of users to be invited", "items": { "type": "object", "properties": { "type": { "type": "string" }, "value": { "type": "string" } } } } }, "required": [ "roomId", "userIds" ] } ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "channel": { "type": "object", "properties": { "_id": { "type": "string" }, "fname": { "type": "string" }, "customFields": { "type": "object" }, "description": { "type": "string" }, "broadcast": { "type": "boolean" }, "encrypted": { "type": "boolean" }, "federated": { "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" }, "lm": { "type": "string" }, "lastMessage": { "type": "object", "properties": { "_id": { "type": "string" }, "t": { "type": "string" }, "msg": { "type": "string" }, "groupable": { "type": "boolean" }, "blocks": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "blockId": { "type": "string" }, "callId": { "type": "string" }, "appId": { "type": "string" } } } }, "ts": { "type": "string" }, "u": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" }, "name": { "type": "string" } } }, "rid": { "type": "string" }, "_updatedAt": { "type": "string" }, "urls": { "type": "array", "items": { "type": "object" } }, "mentions": { "type": "array", "items": { "type": "object" } }, "channels": { "type": "array", "items": { "type": "object" } } } } } }, "success": { "type": "boolean" } } }, "examples": { "Add bulk users": { "value": { "channel": { "_id": "ByehQjC44FwMeiLbX", "ts": "2016-11-30T21:23:04.737Z", "t": "c", "name": "testing", "usernames": [ "testing", "testing1" ], "msgs": 1, "_updatedAt": "2016-12-09T12:50:51.575Z", "lm": "2016-12-09T12:50:51.555Z" }, "success": true } }, "Add a user": { "value": { "channel": { "_id": "ByehQjC44FwMeiLbX", "ts": "2016-11-30T21:23:04.737Z", "t": "c", "name": "testing", "usernames": "testing", "msgs": 1, "_updatedAt": "2016-12-09T12:50:51.575Z", "lm": "2016-12-09T12:50:51.555Z" }, "success": true } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } }, "x-d360-narrative-body": "
You can enter the user ID of one user or add multiple users. Use any one of the objects above as the body parameters.
" } } }, "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." } } } } } } } } } ````