---
title: "Leave a Team"
slug: "leave-a-team"
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 a Team

Post/api/v1/teams.leave

Leave a team

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='9cba5280-f2bf-4a86-ab7c-9a8b43308800'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='fe62c4e6-6c30-40b7-8664-ad3ce375537d'>Example</option>
</select>Example

```json
{
  "teamName": "team1",
  "rooms": [
    "8dugqGhuRvCBLdZft"
  ]
}
```

object  teamIdstring    Required

Enter the team ID. Alternatively, enter the `teamName` parameter and provide the team's name as the value.

rooms Array of string   Required

The team room IDs to remove the user from.

string    

Responses200

OK

<select class='api-response-data' aria-label='Media type'><option value='7aa68aa7-124b-4faf-baaf-f90c6c54c591'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='30e074ee-dd04-4cdc-90b6-e5adcf7483ad'>Success</option>
</select>Success

```json
{
  "success": true
}
```

object  successboolean    

401

Unauthorized

<select class='api-response-data' aria-label='Media type'><option value='dfa100f0-c06f-404e-9555-ca0d9fc75527'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='2ee8990a-c238-480c-8b02-8ede769105c2'>Authorization Error</option>
</select>Authorization Error

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

object  statusstring    
messagestring
