# Teams API

> Reference for the 2 public v1 operations of the Teams API, generated from the OpenAPI spec.

Source: https://docs.nexafone.so/v1/api/teams/

Generated from `api/openapi.public.yaml`, the same spec the API serves. Try these operations in the [API console](/v1/api/console/); errors are [Problem Details](/v1/errors/).

## List the workspace's teams

`GET /api/v1/workspaces/{workspaceId}/teams`

| | |
| --- | --- |
| Operation id | `listTeams` |
| Authentication | A secret key (`sk_live_…` or `sk_test_…`), an SDK session token (`sdk_…`), or a secret partner key for one of the partner’s stores. |
| Permission (key scope) | `team:view` |
| Plan feature | `seats` |

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | path | string | yes | Workspace id (UUID) |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | OK | `application/json`: [ListTeamsOutputBody](/v1/api/schemas/#listteamsoutputbody) |
| default | Error | `application/problem+json`: [Problem](/v1/api/schemas/#problem) |

### Example

```bash
curl -X GET "https://api.nexafone.so/api/v1/workspaces/{workspaceId}/teams" \
  -H "Authorization: Bearer $NEXAFON_SECRET_KEY"
```

## Get a team

`GET /api/v1/workspaces/{workspaceId}/teams/{teamId}`

| | |
| --- | --- |
| Operation id | `getTeam` |
| Authentication | A secret key (`sk_live_…` or `sk_test_…`), an SDK session token (`sdk_…`), or a secret partner key for one of the partner’s stores. |
| Permission (key scope) | `team:view` |
| Plan feature | `seats` |

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | path | string | yes | Workspace id (UUID) |
| `teamId` | path | string | yes | Team id (UUID) |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | OK | `application/json`: [TeamDetailBody](/v1/api/schemas/#teamdetailbody) |
| 404 | Not Found | `application/problem+json`: [Problem](/v1/api/schemas/#problem) |
| 422 | Unprocessable Entity | `application/problem+json`: [Problem](/v1/api/schemas/#problem) |
| 500 | Internal Server Error | `application/problem+json`: [Problem](/v1/api/schemas/#problem) |

### Example

```bash
curl -X GET "https://api.nexafone.so/api/v1/workspaces/{workspaceId}/teams/{teamId}" \
  -H "Authorization: Bearer $NEXAFON_SECRET_KEY"
```
