> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openbunny.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Teams

> Cloud API endpoints for team management.

All endpoints require authentication. See [Authentication](/cloud/authentication).

## List teams

```bash theme={null}
GET /api/teams
```

Returns all teams the authenticated user belongs to.

## Create a team

```bash theme={null}
POST /api/teams
```

<ParamField body="name" type="string" required>
  Team name
</ParamField>

The creating user is automatically assigned the `owner` role.

## List team members

```bash theme={null}
GET /api/teams/:teamId/members
```

## Add a team member

```bash theme={null}
POST /api/teams/:teamId/members
```

<ParamField body="email" type="string" required>
  Email of the user to invite
</ParamField>

<ParamField body="role" type="string" default="member">
  Role: `owner`, `admin`, or `member`
</ParamField>

Requires `admin` or `owner` role.

## Update a member's role

```bash theme={null}
PATCH /api/teams/:teamId/members/:memberId
```

<ParamField body="role" type="string" required>
  New role
</ParamField>

## Remove a team member

```bash theme={null}
DELETE /api/teams/:teamId/members/:memberId
```

Requires `admin` or `owner` role.
