# Team API

> Team in the Broker & Agent API: list the workspace's people; list the workspace's teams.

Base URL: `https://workspace.brokerandagent.com/api/public/v1`. Every call needs an [API key or OAuth token](https://brokerandagent.com/developers/api/authentication).

- [List the workspace's people](#list-the-workspace-s-people): `GET /seats`
- [List the workspace's teams](#list-the-workspace-s-teams): `GET /teams`

## List the workspace's people

`GET /seats`

Read-only: who a seat id on a task, message or appointment is, and their company role.

Scope: `crm.read`

**Parameters**

| Name | In | Type | |
|---|---|---|---|
| `includeInactive` | query | boolean | Also list seats that were closed (offboarded), for attributing old records. Default `false`. |

```bash
curl https://workspace.brokerandagent.com/api/public/v1/seats \
  -H "Authorization: Bearer bak_YOUR_KEY"
```

**Responses**

| Status | | Returns |
|---|---|---|
| `200` | Seats. | { `seats`: array of [Seat](https://brokerandagent.com/developers/api/reference/objects#seat) } |
| `401` | No credential, or one that's unknown, expired or revoked (unauthorized); or the workspace is suspended (workspace_suspended). |  |
| `403` | The credential lacks the scope (insufficient_scope, naming it in `scope`), the record isn't the person's to change (forbidden), the connection wasn't granted that workspace (workspace_not_granted), or an assistant-only token called outside the assistant's tools (wrong_audience). |  |
| `429` | Too many requests for this credential; wait for Retry-After (rate_limited). |  |

## List the workspace's teams

`GET /teams`

Read-only: each place (a region, office or team), its parent, its members and the role each holds there.

Scope: `crm.read`

```bash
curl https://workspace.brokerandagent.com/api/public/v1/teams \
  -H "Authorization: Bearer bak_YOUR_KEY"
```

**Responses**

| Status | | Returns |
|---|---|---|
| `200` | Teams. | { `teams`: array of [Team](https://brokerandagent.com/developers/api/reference/objects#team) } |
| `401` | No credential, or one that's unknown, expired or revoked (unauthorized); or the workspace is suspended (workspace_suspended). |  |
| `403` | The credential lacks the scope (insufficient_scope, naming it in `scope`), the record isn't the person's to change (forbidden), the connection wasn't granted that workspace (workspace_not_granted), or an assistant-only token called outside the assistant's tools (wrong_audience). |  |
| `429` | Too many requests for this credential; wait for Retry-After (rate_limited). |  |

---

Source: https://brokerandagent.com/developers/api/reference/team
