---
title: "Patch Team"
method: PATCH
path: "/api/v2/teams/{team_id}"
tags: ["Teams V2"]
---

# Patch Team

`PATCH /api/v2/teams/{team_id}`

## Request

- Base URL: `https://public-api.linearb.io`
- URL: `https://public-api.linearb.io/api/v2/teams/{team_id}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/linearb/apis/linearb-api/docs/api/v2/teams/:team_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Teams V2 API endpoint performs a LinearB team patch based on the provided team ID.

## Path parameters

- `team_id` integer, required

## Request body

- TeamV2PatchModel: Model for patching a team. All fields are optional but at least one must be provided. Inherits all validation rules from TeamV2CreationModel.
  - `name` string: Team name must be at least 3 characters long, start with a letter
  - `parent_team` string: Team parent name must be at least 3 characters long, start with a letter
  - `initials` string: Team initials must be 1 to 3 characters long and contain only letters or numbers.
  - `color` string: Team color must be a valid hex code in the format #RGB or #RRGGBB.

## Response `200`

Successful Response

- TeamV2Model: Model representing a team in the system. Attributes: id (int): The unique identifier of the team. organization_id (int): The ID of the organization this team belongs to. name (str): The name of the team. color (Optional[str]): The team's color in hex format. created_at (str): The timestamp when the team was created. updated_at (Optional[str]): The timestamp when the team was last updated. deleted_at (Optional[str]): The timestamp when the team was deleted, if applicable. established_at (Optional[str]): The timestamp when the team was established. initials (Optional[str]): The team's initials (1-3 characters). parent_id (Optional[int]): The ID of the parent team, if this team is a sub-team. extra (Optional[Dict]): Additional custom information about the team.
  - `color` string: The team's color in hex format
  - `created_at` string, required: The timestamp when the team was created
  - `deleted_at` string: The timestamp when the team was deleted, if applicable
  - `established_at` string: The timestamp when the team was established
  - `extra` object: Additional custom information about the team
  - `id` integer, required: The unique identifier of the team
  - `initials` string: The team's initials (1-3 characters)
  - `name` string, required: The name of the team
  - `organization_id` integer, required: The ID of the organization this team belongs to
  - `parent_id` integer: The ID of the parent team, if this team is a sub-team
  - `updated_at` string: The timestamp when the team was last updated
  - `contributors` unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `422`: Validation Error
- `500`: Internal Server Error
- `504`: Gateway Timeout

---

[API](https://skmtc.dev/linearb/apis/linearb-api.md) - [All operations](https://skmtc.dev/linearb/apis/linearb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/linearb/apis/linearb-api/revisions/3aea06710db6?raw)
