---
title: "Set Group Type"
slug: "set-group-type"
updated: 2026-06-01T06:32:04Z
published: 2026-06-01T06:32:04Z
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.

# Set Group Type

Post/api/v1/groups.setType

Set the room type. The group type can be either `c` (public) or `p` (private). Any of the following permissions are required:

- `create-c`: This permission is required if you are changing a private channel to a public channel.
- `create-p`: This permission is required if you are changing a public channel to a private room.
- `create-team-channel`: This permission is required if you are changing a team's private channel to a public channel.
- `create-team-group`: This permission is required if you are changing a team's public channel to a private room.

For ABAC-managed private rooms, changing the type from `p` to `c` is rejected with `error-action-not-allowed`. When the type changes to `c` (public) and the group has ABAC attributes, all ABAC attributes on the group are cleared as part of the conversion.

### Changelog

| Version | Description |
| --- | --- |
| 8.5.0 | Added ABAC behavior for `p` -> `c`: ABAC-managed private rooms are rejected, and successful conversions to public clear group ABAC attributes. |
| 0.49.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='6c3b56e7-3655-48a0-8102-4756d15c456a'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='2a46916e-1cca-42e1-8637-77d21901c6ae'>Example</option>
</select>Example

```json
{
  "roomId": "ByehQjC44FwMeiLbX",
  "type": "c"
}
```

object  roomIdstring    Required

The group ID. 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.

typestring    Required

Enter the group type.

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='60d45a30-8228-4135-9b31-359a0c76c82f'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='f2007fd6-ef77-45e7-862f-0c3f8f8b6335'>Example</option>
</select>Example

```json
{
  "group": {
    "_id": "ByehQjC44FwMeiLbX",
    "name": "testing0",
    "t": "c",
    "msgs": 0,
    "u": {
      "_id": "aiPqNoGkjpNDiRx6d",
      "username": "goose160"
    },
    "ts": "2017-01-05T18:02:50.754Z",
    "ro": false,
    "sysMes": true,
    "_updatedAt": "2017-01-05T19:02:24.429Z",
    "usernames": [
      "goose160",
      "graywolf336"
    ],
    "joinCodeRequired": true,
    "muted": []
  },
  "success": true
}
```

Expand Allobject  groupobject  _idstring    
namestring    
tstring    
msgsinteger    
uobject  _idstring    
usernamestring    

tsstring    
roboolean    
sysMesboolean    
_updatedAtstring    
usernames Array of string   string    
joinCodeRequiredboolean    
muted Array of object   object  

successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='a2e0cae5-7e11-4bd7-83aa-3a8c0c6c8b8e'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='a62d39df-fe05-42e7-ac9d-25698c57be37'>Missing body param: type</option>
<option value='4b88f0f8-40e2-4ec9-a1f3-4e220e098176'>ABAC-managed room conversion blocked</option>
</select>Missing body param: type

```json
{
  "success": false,
  "error": "The bodyParam \"type\" is required"
}
```

ABAC-managed room conversion blocked

```json
{
  "success": false,
  "error": "Changing an ABAC managed private room to public is not allowed [error-action-not-allowed]",
  "errorType": "error-action-not-allowed",
  "details": {
    "method": "saveRoomSettings",
    "action": "Change_Room_Type"
  }
}
```

Expand Allobject  successboolean    
errorstring    
errorTypestring    
detailsobject  methodstring    
actionstring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='ca8afff1-14e4-486c-ae74-04097015f8bd'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='c832cbf8-7b60-436f-8d33-9f9619ed1722'>Authorization Error</option>
</select>Authorization Error

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

object  statusstring    
messagestring
