---
title: "Leave Group"
slug: "leave-group-1"
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.

# Leave Group

Post/api/v1/groups.leave

Leave a private channel. Leave a private channel. If a group owner is leaving, they must set another owner before leaving the group. Permission required: `leave-p`

### 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='ea238c3d-74eb-41b1-91c4-7db603e0cf58'>application/json</option>
</select>object  roomIdstring    

The group ID that you want to leave.

ExampleByehQjC44FwMeiLbX

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='3c582e0f-4b07-4159-be24-27c14a1798f7'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='1b4f40d1-4249-4fcd-ad6e-45e876b7cd18'>Success</option>
</select>Success

```json
{
  "group": {
    "_id": "ByehQjC44FwMeiLbX",
    "name": "invite-me",
    "t": "p",
    "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  groupobject  _idstring    
namestring    
tstring    
usernames Array of string   string    
msgsinteger    
uobject  _idstring    
usernamestring    

tsstring    
roboolean    
sysMesboolean    
_updatedAtstring    

successboolean    

400

Bad Request

<select class='api-response-data' aria-label='Media type'><option value='50a45972-4464-4ab4-aec5-1927c85d7234'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='968a7d72-eaf0-4a29-9375-82f2bd6e7ebe'>Example 1</option>
<option value='3590a907-a54d-4444-a409-a812c0e74aac'>Example 2</option>
</select>Example 1

```json
{
  "success": false,
  "error": "You are the last owner. Please set new owner before leaving the room. [error-you-are-last-owner]",
  "errorType": "error-you-are-last-owner",
  "details": {
    "method": "leaveRoom"
  }
}
```

Example 2

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

Expand Allobject  successboolean    
errorstring    
errorTypestring    
detailsobject  methodstring    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='9f0bea86-1970-41ae-b931-59d236c9cd26'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='7c0ad867-717c-441f-bb46-edbe1928985d'>Authorization Error</option>
</select>Authorization Error

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

object  statusstring    
messagestring
