---
title: "Set Channel Type"
slug: "set-channel-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 Channel Type

Post/api/v1/channels.setType

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

- `create-c`: To change a private group to a public channel.
- `create-p`: To change a 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 room has ABAC attributes, all ABAC attributes on the room 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 room 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='a0359a92-a70c-424f-8a18-77e0d8a4c26a'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='2521dbd1-1552-49ed-8f42-8859aad85354'>Example</option>
</select>Example

```json
{
  "roomId": "WDuJLFkjwk6L7LdFC",
  "type": "p"
}
```

object  roomIdstring    Required

The channel's ID. Alternatively, enter the `channelName` parameter and provide the channel's name as the value.

typestring    Required

The channel's type. The type of room this channel should be, either c or p.

`c` is for channel and `p` is for private.

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='227e4d7b-5acf-4a16-85bc-d20e7d6479a8'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='aec55756-0598-4e24-aee8-c7839848b88f'>Success</option>
</select>Success

```json
{
  "channel": {
    "_id": "ByehQjC44FwMeiLbX",
    "name": "testing0",
    "t": "p",
    "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  channelobject  _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='83c09730-158c-47f4-838b-e1740edc4343'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='ba5ea18d-5ce4-4177-ae19-e6a528e29ddc'>ABAC-managed room conversion blocked</option>
</select>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='2034dc37-23e8-4288-babd-323f65bbf5ab'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='928bb86f-eff8-49f3-bd8e-5d6a66211f1d'>Authorization Error</option>
</select>Authorization Error

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

object  statusstring    
messagestring
