---
title: "Change what a team is and what it is called"
method: PATCH
path: "/api/v1/teams/{id}"
tags: ["Team"]
---

# Change what a team is and what it is called

`PATCH /api/v1/teams/{id}`

## Request

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

Whether it is held by a person or a company, its name, and the registration details that go on a document. Owners only: a member may read the team but not rename it.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `legalForm` 'individual' | 'company' | 'partnership' | 'trust'
  - `taxId` string
  - `registrationNumber` string
  - `contactEmail` string
  - `vatRegistered` boolean
  - `address` object
    - `line1` string
    - `postcode` string
    - `city` string
    - `region` string
    - `country` string
    - `countryCode` string

## Response `200`

The team as it now stands.

- 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

- `403`: You are on this team but not as an owner.
- `404`: No such team, or not one of yours.

---

[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)
