# Create a team

> POST /v1/teams creates a team in your organization and returns its ID. Needs an organization key with teams:create, on Pro or Enterprise.

Source: https://docs.scriptmonitoring.com/api/teams/create/ · Plan: Pro and Enterprise · Updated 2026-10-13

`POST /v1/teams` creates a team and returns its ID, ready for [Register domains](https://docs.scriptmonitoring.com/api/domains/create/). Organization keys only (`sm_org_…`), with the `teams:create` scope; a team key gets `401`. Creating teams with the API is included in Pro and Enterprise: on Free it answers `402 upgrade_required`.

```shell
curl -X POST https://data.scriptmonitoring.com/v1/teams/ \
  -H "Authorization: Bearer sm_org_14829305716342_…" \
  -H "Content-Type: application/json" \
  -d '{"name": "Payments"}'
```

## Which keys work?

| Key | Accepted |
| --- | --- |
| Organization key (`sm_org_…`) | Yes, with `teams:create`, on Pro and Enterprise. |
| Team key (`sm_team_…`) | No: `401`. |

A missing, mistyped or revoked key, a key whose prefix doesn't match its type, or a key created before the `sm_org_` / `sm_team_` format gets `401` with this body, and so does a team key:

```json
{ "error": "unauthorized", "message": "Missing or invalid bearer token." }
```

## Request body

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | 3 to 32 characters, unique in the organization. |

## Response

`201` with:

```json
{ "data": { "teamId": "14827391650423" } }
```

On an Enterprise organization the new team is on Enterprise. On a Pro organization it starts on Free and needs its own subscription.

Errors: `400`, `401`, `402 upgrade_required`, `403` (`insufficient_scope`, `organization_suspended`), `409 team_name_exists` (the body includes the existing `teamId`), `429`, `503`.

## Related

- [REST API](https://docs.scriptmonitoring.com/api/)
- [Register domains](https://docs.scriptmonitoring.com/api/domains/create/)
