---
title: "Invite Users to Group"
slug: "invite-users-to-group"
updated: 2026-06-08T12:46:40Z
published: 2026-06-08T12:46:40Z
stale: true
---

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

# Invite Users to Group

Post/api/v1/groups.invite

Invite one user or bulk users to a private channel. Any of the following permissions are required:

- `add-user-to-joined-room`: This permission is required if you want to add users to the channel that you have joined.
- `add-user-to-any-p-room`: This permission is required to add users to any private channel.

You can identify the group by `roomId` or `roomName`, and the user(s) by `userId`, `username`, `userIds`, or `usernames`.

### Changelog

| Version | Description |
| --- | --- |
| 0.48.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='73abcbac-216f-4dc9-b1b0-022c7f793d54'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='d62f3916-7e78-42f0-b745-a23f76df6b3c'>Invite by IDs</option>
<option value='c6afea84-ced5-4913-bc32-2ef46bc97abe'>Invite by names</option>
<option value='c2841bc4-2ccf-4d44-a07e-d80bec033b68'>Invite multiple users by ID</option>
<option value='d3ffa437-4198-4d6d-8a34-8197e9078b08'>Invite multiple users by username</option>
</select>Invite by IDs

```json
{
  "roomId": "ByehQjC44FwMeiLbX",
  "userId": "nSYqWzZ4GsKTX4dyK"
}
```

Invite by names

```json
{
  "roomName": "private-abc",
  "username": "john.doe"
}
```

Invite multiple users by ID

```json
{
  "roomId": "ByehQjC44FwMeiLbX",
  "userIds": [
    "nSYqWzZ4GsKTX4dyK",
    "SYqWzZ4Gsasdfgh"
  ]
}
```

Invite multiple users by username

```json
{
  "roomName": "private-abc",
  "usernames": [
    "john.doe",
    "jane.doe"
  ]
}
```

object  roomIdstring    

The group ID. This parameter is required if no `roomName` is provided. You can find the IDs by using any of the following endpoints:

- [Get List of User Groups](https://developer.rocket.chat/apidocs/get-list-of-user-groups): This endpoint returns all private channels in the workspace, if you have the required permissions to view them.
- [Get Groups](https://developer.rocket.chat/apidocs/get-groups): This endpoint returns the private channels that you are a member of.

ExampleByehQjC44FwMeiLbX
roomNamestring    

The group name. This parameter is required if no `roomId` is provided.

Exampleprivate-abc
userIdstring    

The ID of the user to be invited. This parameter is required if no `username`, `userIds`, or `usernames` is provided.

ExamplenSYqWzZ4GsKTX4dyK
usernamestring    

The username of the user to be invited. This parameter is required if no `userId`, `userIds`, or `usernames` is provided.

Examplejohn.doe
userIds Array of string   

An array of user IDs to invite. This parameter is required if no `userId`, `username`, or `usernames` is provided.

Example[
  "nSYqWzZ4GsKTX4dyK",
  "SYqWzZ4Gsasdfgh"
]string    
usernames Array of string   

An array of usernames to invite. This parameter is required if no `userId`, `username`, or `userIds` is provided.

Example[
  "john.doe",
  "jane.doe"
]string    

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='9152a03c-a41e-40c5-8e05-fc934b284197'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='d4543644-b963-42c4-9464-5dc1931ee17e'>Success</option>
</select>Success

```json
{
  "group": {
    "_id": "ByehQjC44FwMeiLbX",
    "ts": "2016-11-30T21:23:04.737Z",
    "t": "p",
    "name": "testing",
    "usernames": [
      "testing",
      "testing1"
    ],
    "u": {
      "_id": "aobEdbYhXfu5hkeqG",
      "username": "testing1"
    },
    "msgs": 1,
    "_updatedAt": "2016-12-09T12:50:51.575Z",
    "lm": "2016-12-09T12:50:51.555Z"
  },
  "success": true
}
```

Expand Allobject  groupobject  _idstring    
tsstring    
tstring    
namestring    
usernames Array of string   string    
uobject  _idstring    
usernamestring    

msgsinteger    
_updatedAtstring    
lmstring    

successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='d91afe52-ea99-4574-bd27-7b9b6aa89fba'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='ab26ab75-04e8-457a-a426-092d1041c16c'>Room parameter required</option>
<option value='28df419a-2ea4-4233-bec2-3898a7cbda00'>User parameter required</option>
<option value='5b3f3fd3-8e60-498b-aafc-44c8dd9e13cd'>Permission required</option>
</select>Room parameter required

```json
{
  "success": false,
  "error": "The parameter \"roomId\" or \"roomName\" is required [error-room-param-not-provided]",
  "errorType": "error-room-param-not-provided"
}
```

User parameter required

```json
{
  "success": false,
  "error": "Please provide \"userId\" or \"username\" or \"userIds\" or \"usernames\" as param [error-users-params-not-provided]",
  "errorType": "error-users-params-not-provided"
}
```

Permission required

```json
{
  "success": false,
  "error": "Not allowed [error-not-allowed]",
  "errorType": "error-not-allowed",
  "details": {
    "method": "addUsersToRoom"
  }
}
```

Expand Allobject  successboolean    
errorstring    
errorTypestring    
detailsobject  methodstring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='d39100d8-debd-4cba-85b5-f3ea0e9892db'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='c97ad33b-b35c-4219-8807-2a142db88d55'>Authorization Error</option>
</select>Authorization Error

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

object  statusstring    
messagestring
