---
title: "Create a team"
method: POST
path: "/api/v1/teams"
tags: ["Teams"]
---

# Create a team

`POST /api/v1/teams`

## Request

- Base URL: `https://charm.ing`
- URL: `https://charm.ing/api/v1/teams`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Secure-better-auth.session_token`

User-gated (`chrm_user_*` or session). Creates a team; the caller becomes its owner. The slug shares the handle namespace with user handles. Refused with 403 `plan_required` (`feature: 'teams'`) unless the caller's plan includes teams; teams come with the Business plan and are set up with Charming.

## Request body

- object
  - `name` string, required
  - `slug` string, required: Team handle (kebab-case, shared namespace).

## Response `201`

Team created.

- TeamCreateResponse
  - `ok` true, required
  - `team` object, required
    - `id` string, required
    - `slug` string, required

## Other responses

- `400`: Invalid body or invalid slug.
- `401`: Sign-in required.
- `403`: The caller's plan does not include teams.
- `409`: The slug is already taken.

---

[API](https://skmtc.dev/charm/apis/charming-api.md) · [All operations](https://skmtc.dev/charm/apis/charming-api/llms.txt) · [OpenAPI document](https://skmtc.dev/charm/apis/charming-api/revisions/a9d06c419b3a?raw)
