---
title: "Leave  Channel"
slug: "leave-channel"
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.

# Leave  Channel

Post/api/v1/channels.leave

Leave a public channel. Permission required: `leave-c`

### 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='437a87ba-c803-45ef-a3dd-3eae51e22132'>application/json</option>
</select>object  roomIdstring    

The channel ID that you want to leave.

ExampleByehQjC44FwMeiLbX

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='0b4bc9dc-f561-4255-8a57-02535b42f62a'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='c785b1cd-30d1-4bdc-a150-7aa523ff9eed'>Example</option>
</select>Example

```json
{
  "channel": {
    "_id": "ByehQjC44FwMeiLbX",
    "name": "invite-me",
    "t": "c",
    "usernames": [
      "testing2"
    ],
    "msgs": 0,
    "u": {
      "_id": "aobEdbYhXfu5hkeqG",
      "username": "testing1"
    },
    "ts": "2016-12-09T15:08:58.042Z",
    "ro": false,
    "sysMes": true,
    "_updatedAt": "2016-12-09T15:22:40.656Z"
  },
  "success": true
}
```

Expand Allobject  channelobject  _idstring    
namestring    
tstring    
usernames Array of string   string    
msgsinteger    
uobject  _idstring    
usernamestring    

tsstring    
roboolean    
sysMesboolean    
_updatedAtstring    

successboolean    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='0cf14e74-3565-4f45-ad16-ff16287d8fc3'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='3a35760c-ccc4-4c49-a712-5061557f0c09'>Authorization Error</option>
</select>Authorization Error

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

object  statusstring    
messagestring
