---
title: "Open a new team"
method: POST
path: "/api/v1/teams"
tags: ["Team"]
---

# Open a new team

`POST /api/v1/teams`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/teams`
- Auth: API key in cookie `better-auth.session_token`

Only the name. The team starts empty, with you as its owner, and everything else is filled in afterwards on its own settings page.

Send an `id` of your own and the request can be repeated safely: a team you already opened under that id comes back as it is, so a retry after an answer that never arrived opens one team rather than two.

## Request body

- object
  - `name` string, required
  - `id` string: An id minted by the client, as `team_` and 8 to 40 letters or digits. Leave it out and the server mints one.

## Response `200`

The team, ready to switch into.

- object
  - `ok` unknown, required
  - `data` object, required
    - `team` object, required
      - `id` string, required: The team id. It is the segment in every /app URL and the key the portfolio is stored under.
      - `name` string, required: What the team is called. The only thing asked for when it is opened.
      - `legalForm` 'individual' | 'company' | 'partnership' | 'trust', required
      - `permissions` 'owner' | 'member', nullable, required: What you may do here. Null for an admin who is not on the team.
      - `detailed` boolean, required: False while nothing beyond the name has been filled in, which is what the nudge after creation reads.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: The name was missing or too long, or the id is not a team id.
- `409`: A team already carries that id and you did not open it.

---

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