---
title: "Teams – Superbot API"
canonical_url: "https://superbot.gg/developers/teams"
last_updated: "2026-09-25"
summary: "Teams, their members and their invites."
---

> Markdown twin of https://superbot.gg/developers/teams (the HTML page is canonical).
> The site index for agents is /llms.txt; every content page has a twin at its path plus `.md`.

# Teams

Teams, their members and their invites.

Base URL: `https://superbot.gg`. Errors: [https://superbot.gg/developers#errors](https://superbot.gg/developers#errors). Spec: [https://superbot.gg/docs/openapi.json](https://superbot.gg/docs/openapi.json).

## Operations

- [List teams](https://superbot.gg/developers/teams/listTeams.md): `GET /v1/teams`
- [Create a team](https://superbot.gg/developers/teams/createTeam.md): `POST /v1/teams`
- [Get a team](https://superbot.gg/developers/teams/getTeam.md): `GET /v1/teams/{team_id}`
- [Update a team](https://superbot.gg/developers/teams/updateTeam.md): `PATCH /v1/teams/{team_id}`
- [Delete a team](https://superbot.gg/developers/teams/deleteTeam.md): `DELETE /v1/teams/{team_id}`
- [List team members](https://superbot.gg/developers/teams/listTeamMembers.md): `GET /v1/teams/{team_id}/members`
- [Change a member’s role](https://superbot.gg/developers/teams/updateTeamMember.md): `PATCH /v1/teams/{team_id}/members/{user_id}`
- [Remove a team member](https://superbot.gg/developers/teams/removeTeamMember.md): `DELETE /v1/teams/{team_id}/members/{user_id}`
- [List pending team invites](https://superbot.gg/developers/teams/listTeamInvites.md): `GET /v1/teams/{team_id}/invites`
- [Invite someone to a team](https://superbot.gg/developers/teams/createTeamInvite.md): `POST /v1/teams/{team_id}/invites`
- [Revoke a team invite](https://superbot.gg/developers/teams/revokeTeamInvite.md): `DELETE /v1/teams/{team_id}/invites/{code}`
- [Resend a team invite](https://superbot.gg/developers/teams/resendTeamInvite.md): `POST /v1/teams/{team_id}/invites/{code}/resend`
- [Accept a team invite](https://superbot.gg/developers/teams/acceptTeamInvite.md): `POST /v1/team_invites/{code}/accept`

## List teams

`GET /v1/teams`

Every team the caller is a live member of, oldest first. A team key sees only its own team.

- Operation id: `listTeams`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:read` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:read`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | optional | Items per page, 1-100. |
| `after_id` | string | optional | Return the page after this resource id (the previous page’s `last_id`). |
| `before_id` | string | optional | Return the page before this resource id (the next page’s `first_id`). |

### Response 200

One page of teams.

`application/json`: TeamList.

- `object` (string, required): One of `list`.
- `data` (array of Team, required)
  - `id` (string, required)
  - `object` (string, required): One of `team`.
  - `name` (string, required)
  - `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
  - `member_count` (integer, required)
  - `created_at` (string, required)
  - `share_defaults` (object, required): What a new member pools by default, per kind.
    - `mcp` (boolean, required)
    - `rules` (boolean, required)
    - `skills` (boolean, required)
  - `share_policy` (string, required): Who may add items to the pool. One of `members`, `editors`.
  - `require_manual_confirm` (boolean, required)
- `has_more` (boolean, required)
- `first_id` (string | null, required): Id of the first item on this page; pass as `before_id` for the previous page.
- `last_id` (string | null, required): Id of the last item on this page; pass as `after_id` for the next page.

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The request is malformed or a parameter is invalid; `param` names the field. |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |

### Examples

```sh
curl -sS -X GET "https://superbot.gg/v1/teams" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const res = await fetch(`https://superbot.gg/v1/teams`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/teams",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```

## Create a team

`POST /v1/teams`

Create a team with the caller as its one owner. The owner’s Helper sets up the team key when it next syncs.

- Operation id: `createTeam`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Request body

`application/json`, required.

- `name` (string, required)

### Response 201

The new team.

`application/json`: Team.

- `id` (string, required)
- `object` (string, required): One of `team`.
- `name` (string, required)
- `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
- `member_count` (integer, required)
- `created_at` (string, required)
- `share_defaults` (object, required): What a new member pools by default, per kind.
  - `mcp` (boolean, required)
  - `rules` (boolean, required)
  - `skills` (boolean, required)
- `share_policy` (string, required): Who may add items to the pool. One of `members`, `editors`.
- `require_manual_confirm` (boolean, required)

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The request is malformed or a parameter is invalid; `param` names the field. |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |

### Examples

```sh
curl -sS -X POST "https://superbot.gg/v1/teams" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"your-name"}'
```

```js
const res = await fetch(`https://superbot.gg/v1/teams`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({"name":"your-name"}),
});
console.log(res.status, await res.json());
```

```python
import os
import requests

res = requests.request(
    "POST",
    "https://superbot.gg/v1/teams",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
        "content-type": "application/json",
    },
    json={"name":"your-name"},
)
print(res.status_code, res.json())
```

## Get a team

`GET /v1/teams/{team_id}`

One team the caller is a member of, with the caller’s own role.

- Operation id: `getTeam`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:read` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:read`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |

### Response 200

The team.

`application/json`: Team.

- `id` (string, required)
- `object` (string, required): One of `team`.
- `name` (string, required)
- `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
- `member_count` (integer, required)
- `created_at` (string, required)
- `share_defaults` (object, required): What a new member pools by default, per kind.
  - `mcp` (boolean, required)
  - `rules` (boolean, required)
  - `skills` (boolean, required)
- `share_policy` (string, required): Who may add items to the pool. One of `members`, `editors`.
- `require_manual_confirm` (boolean, required)

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |

### Examples

```sh
curl -sS -X GET "https://superbot.gg/v1/teams/$TEAM_ID" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
res = requests.request(
    "GET",
    f"https://superbot.gg/v1/teams/{team_id}",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```

## Update a team

`PATCH /v1/teams/{team_id}`

Rename a team or change its sharing settings. Only the fields sent change. Admins and owners only.

- Operation id: `updateTeam`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |

### Request body

`application/json`, required.

- `name` (string)
- `share_defaults` (object): What a new member pools by default, per kind.
  - `mcp` (boolean, required)
  - `rules` (boolean, required)
  - `skills` (boolean, required)
- `share_policy` (string): Who may add items to the pool. One of `members`, `editors`.
- `require_manual_confirm` (boolean): Whether an admin must confirm each new member before they receive team secrets.

### Response 200

The updated team.

`application/json`: Team.

- `id` (string, required)
- `object` (string, required): One of `team`.
- `name` (string, required)
- `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
- `member_count` (integer, required)
- `created_at` (string, required)
- `share_defaults` (object, required): What a new member pools by default, per kind.
  - `mcp` (boolean, required)
  - `rules` (boolean, required)
  - `skills` (boolean, required)
- `share_policy` (string, required): Who may add items to the pool. One of `members`, `editors`.
- `require_manual_confirm` (boolean, required)

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The request is malformed or a parameter is invalid; `param` names the field. |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |

### Examples

```sh
curl -sS -X PATCH "https://superbot.gg/v1/teams/$TEAM_ID" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"your-name","share_defaults":{"mcp":true,"rules":true,"skills":true},"share_policy":"members"}'
```

```js
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}`, {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({"name":"your-name","share_defaults":{"mcp":true,"rules":true,"skills":true},"share_policy":"members"}),
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
res = requests.request(
    "PATCH",
    f"https://superbot.gg/v1/teams/{team_id}",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
        "content-type": "application/json",
    },
    json={"name":"your-name","share_defaults":{"mcp":True,"rules":True,"skills":True},"share_policy":"members"},
)
print(res.status_code, res.json())
```

## Delete a team

`DELETE /v1/teams/{team_id}`

Delete a team and every membership in it. Owners only. This cannot be undone.

- Operation id: `deleteTeam`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |

### Response 200

The team is gone.

`application/json`: DeletedTeam.

- `id` (string, required)
- `object` (string, required): One of `team`.
- `deleted` (boolean, required): One of `true`.

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |

### Examples

```sh
curl -sS -X DELETE "https://superbot.gg/v1/teams/$TEAM_ID" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}`, {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
res = requests.request(
    "DELETE",
    f"https://superbot.gg/v1/teams/{team_id}",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```

## List team members

`GET /v1/teams/{team_id}/members`

The team’s live members, paged by user id in join order.

- Operation id: `listTeamMembers`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:read` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:read`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | optional | Items per page, 1-100. |
| `after_id` | string | optional | Return the page after this resource id (the previous page’s `last_id`). |
| `before_id` | string | optional | Return the page before this resource id (the next page’s `first_id`). |

### Response 200

One page of members.

`application/json`: TeamMemberList.

- `object` (string, required): One of `list`.
- `data` (array of TeamMember, required)
  - `object` (string, required): One of `team_member`.
  - `user_id` (string, required)
  - `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
  - `groups` (array of string, required)
  - `joined_at` (string, required)
- `has_more` (boolean, required)
- `first_id` (string | null, required): Id of the first item on this page; pass as `before_id` for the previous page.
- `last_id` (string | null, required): Id of the last item on this page; pass as `after_id` for the next page.

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The request is malformed or a parameter is invalid; `param` names the field. |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |

### Examples

```sh
curl -sS -X GET "https://superbot.gg/v1/teams/$TEAM_ID/members" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/members`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
res = requests.request(
    "GET",
    f"https://superbot.gg/v1/teams/{team_id}/members",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```

## Change a member’s role

`PATCH /v1/teams/{team_id}/members/{user_id}`

Set a member’s role. You can only grant a role below your own, to a member below your own. Ownership never moves here.

- Operation id: `updateTeamMember`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |
| `user_id` | string | required | The member’s account id. |

### Request body

`application/json`, required.

- `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.

### Response 200

The member.

`application/json`: TeamMember.

- `object` (string, required): One of `team_member`.
- `user_id` (string, required)
- `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
- `groups` (array of string, required)
- `joined_at` (string, required)

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The request is malformed or a parameter is invalid; `param` names the field. |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |

### Examples

```sh
curl -sS -X PATCH "https://superbot.gg/v1/teams/$TEAM_ID/members/$USER_ID" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"role":"owner"}'
```

```js
const teamId = 'TEAM_ID';
const userId = 'USER_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/members/${userId}`, {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({"role":"owner"}),
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
user_id = "USER_ID"
res = requests.request(
    "PATCH",
    f"https://superbot.gg/v1/teams/{team_id}/members/{user_id}",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
        "content-type": "application/json",
    },
    json={"role":"owner"},
)
print(res.status_code, res.json())
```

## Remove a team member

`DELETE /v1/teams/{team_id}/members/{user_id}`

Remove a member. Admins remove members below them; owners remove anyone except the last owner (409 last_owner).

- Operation id: `removeTeamMember`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |
| `user_id` | string | required | The member’s account id. |

### Response 200

The member is removed.

`application/json`: RemovedTeamMember.

- `object` (string, required): One of `team_member`.
- `user_id` (string, required)
- `deleted` (boolean, required): One of `true`.

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |
| 409 | [`conflict`](https://superbot.gg/developers#errors-conflict) | The resource is not in a state that allows this change. |

### Examples

```sh
curl -sS -X DELETE "https://superbot.gg/v1/teams/$TEAM_ID/members/$USER_ID" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const teamId = 'TEAM_ID';
const userId = 'USER_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/members/${userId}`, {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
user_id = "USER_ID"
res = requests.request(
    "DELETE",
    f"https://superbot.gg/v1/teams/{team_id}/members/{user_id}",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```

## List pending team invites

`GET /v1/teams/{team_id}/invites`

Invites not yet accepted, revoked or expired, paged by invite code in the order they were sent. Admins and owners only.

- Operation id: `listTeamInvites`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:read` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:read`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | optional | Items per page, 1-100. |
| `after_id` | string | optional | Return the page after this resource id (the previous page’s `last_id`). |
| `before_id` | string | optional | Return the page before this resource id (the next page’s `first_id`). |

### Response 200

One page of invites.

`application/json`: TeamInviteList.

- `object` (string, required): One of `list`.
- `data` (array of TeamInvite, required)
  - `object` (string, required): One of `team_invite`.
  - `code` (string, required)
  - `email` (string, required)
  - `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
  - `created_at` (string, required)
  - `expires_at` (string)
- `has_more` (boolean, required)
- `first_id` (string | null, required): Id of the first item on this page; pass as `before_id` for the previous page.
- `last_id` (string | null, required): Id of the last item on this page; pass as `after_id` for the next page.

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The request is malformed or a parameter is invalid; `param` names the field. |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |

### Examples

```sh
curl -sS -X GET "https://superbot.gg/v1/teams/$TEAM_ID/invites" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/invites`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
res = requests.request(
    "GET",
    f"https://superbot.gg/v1/teams/{team_id}/invites",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```

## Invite someone to a team

`POST /v1/teams/{team_id}/invites`

Email an invite for a role below your own (default member). A pending invite to the same address is replaced. Invites expire after 7 days.

- Operation id: `createTeamInvite`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |

### Request body

`application/json`, required.

- `email` (string, required)
- `role` (TeamRole): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.

### Response 201

The invite, already mailed.

`application/json`: TeamInvite.

- `object` (string, required): One of `team_invite`.
- `code` (string, required)
- `email` (string, required)
- `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
- `created_at` (string, required)
- `expires_at` (string)

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The request is malformed or a parameter is invalid; `param` names the field. |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |

### Examples

```sh
curl -sS -X POST "https://superbot.gg/v1/teams/$TEAM_ID/invites" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"email":"user@example.com"}'
```

```js
const teamId = 'TEAM_ID';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/invites`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({"email":"user@example.com"}),
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
res = requests.request(
    "POST",
    f"https://superbot.gg/v1/teams/{team_id}/invites",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
        "content-type": "application/json",
    },
    json={"email":"user@example.com"},
)
print(res.status_code, res.json())
```

## Revoke a team invite

`DELETE /v1/teams/{team_id}/invites/{code}`

Revoke an invite. Its link stops working at once.

- Operation id: `revokeTeamInvite`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |
| `code` | string | required | The invite code. |

### Response 200

The invite is revoked.

`application/json`: RevokedTeamInvite.

- `object` (string, required): One of `team_invite`.
- `code` (string, required)
- `revoked` (boolean, required): One of `true`.

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |

### Examples

```sh
curl -sS -X DELETE "https://superbot.gg/v1/teams/$TEAM_ID/invites/$CODE" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const teamId = 'TEAM_ID';
const code = 'CODE';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/invites/${code}`, {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
code = "CODE"
res = requests.request(
    "DELETE",
    f"https://superbot.gg/v1/teams/{team_id}/invites/{code}",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```

## Resend a team invite

`POST /v1/teams/{team_id}/invites/{code}/resend`

Replace a pending invite with a fresh code and mail it again. The old link stops working.

- Operation id: `resendTeamInvite`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `team_id` | string | required | The team id. |
| `code` | string | required | The invite code. |

### Response 200

The new invite, already mailed.

`application/json`: TeamInvite.

- `object` (string, required): One of `team_invite`.
- `code` (string, required)
- `email` (string, required)
- `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
- `created_at` (string, required)
- `expires_at` (string)

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |
| 409 | [`conflict`](https://superbot.gg/developers#errors-conflict) | The resource is not in a state that allows this change. |

### Examples

```sh
curl -sS -X POST "https://superbot.gg/v1/teams/$TEAM_ID/invites/$CODE/resend" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const teamId = 'TEAM_ID';
const code = 'CODE';
const res = await fetch(`https://superbot.gg/v1/teams/${teamId}/invites/${code}/resend`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

team_id = "TEAM_ID"
code = "CODE"
res = requests.request(
    "POST",
    f"https://superbot.gg/v1/teams/{team_id}/invites/{code}/resend",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```

## Accept a team invite

`POST /v1/team_invites/{code}/accept`

Join the team an invite names. The account’s email must match the invite. `share` chooses what you pool into the team; MCP servers stay unshared unless you set `mcp`.

- Operation id: `acceptTeamInvite`
- Group: [Teams](https://superbot.gg/developers/teams.md)
- Auth: A caller key holding `teams:write` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `teams:write`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | required | The invite code. |

### Request body

`application/json`.

- `share` (object): What to pool into the team, per kind.
  - `mcp` (boolean)
  - `rules` (boolean)
  - `skills` (boolean)

### Response 200

The team you joined.

`application/json`: Team.

- `id` (string, required)
- `object` (string, required): One of `team`.
- `name` (string, required)
- `role` (TeamRole, required): The caller's role in this team. One of `owner`, `admin`, `editor`, `member`.
- `member_count` (integer, required)
- `created_at` (string, required)
- `share_defaults` (object, required): What a new member pools by default, per kind.
  - `mcp` (boolean, required)
  - `rules` (boolean, required)
  - `skills` (boolean, required)
- `share_policy` (string, required): Who may add items to the pool. One of `members`, `editors`.
- `require_manual_confirm` (boolean, required)

### Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |
| 409 | [`conflict`](https://superbot.gg/developers#errors-conflict) | The resource is not in a state that allows this change. |

### Examples

```sh
curl -sS -X POST "https://superbot.gg/v1/team_invites/$CODE/accept" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"share":{"mcp":true,"rules":true,"skills":true}}'
```

```js
const code = 'CODE';
const res = await fetch(`https://superbot.gg/v1/team_invites/${code}/accept`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({"share":{"mcp":true,"rules":true,"skills":true}}),
});
console.log(res.status, await res.json());
```

```python
import os
import requests

code = "CODE"
res = requests.request(
    "POST",
    f"https://superbot.gg/v1/team_invites/{code}/accept",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
        "content-type": "application/json",
    },
    json={"share":{"mcp":True,"rules":True,"skills":True}},
)
print(res.status_code, res.json())
```
