# Patch a Team

Modify a team using a JSON patch format document

**RBAC Capability Required:** `core.team.update`

## Authentication

**Authorization Bearer**

Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Path parameters

### team_name
- **type:** string
- **Required**

## Request

This endpoint expects a list of objects.

## Response

### 200 Updated

- **kind:** string (Optional, The kind of record.)
- **metadata:** object [TeamMetadataSchema](https://docs.mediakind.com/api-reference/management-api/schemas/teammetadataschema) (Required)
  - **id:** string (Required, format: uuid, The ID of the resource)
  - **name:** string (Optional, The name of the resource)
- **spec:** object [TeamSpecSchemaRead](https://docs.mediakind.com/api-reference/management-api/schemas/teamspecschemaread) (Required)
  - **description:** string (Optional, 0-256 characters, A description of the team)
  - **members:** map from strings to object [TeamMemberSchemaRead](https://docs.mediakind.com/api-reference/management-api/schemas/teammemberschemaread) (Optional, The list of members)
    - **[any key]:** object
      - **email:** string (Required, The email address of the team member)
      - **isTeamAdmin:** boolean (Required, Does this user have the ability to edit this team)
      - **name:** string (Required, The name of the team member)
  - **scopes:** map from strings to object [TeamScopeSchema](https://docs.mediakind.com/api-reference/management-api/schemas/teamscopeschema) (Optional, The set of scopes this team has access to, and the roles on each.)
    - **[any key]:** object
      - **roles:** list of strings (Required, The names of the roles.)

## Errors

### 400 Bad Request
- **error:** object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) (Required, Pertinent information about the error)
  - **code:** string (Required, The error code.)
  - **detail:** string (Required, The error message.)
  - **extraDetail:** map from strings to any (Optional, Extra information regarding this error.)
    - **[any key]:** any
  - **ref:** string (Required, A reference to the request that caused the error.)
  - **status:** integer (Required, The HTTP status code)

### 401 Unauthorized
**(Similar structure as above for error details)**

### 403 Forbidden
**(Similar structure as above for error details)**

### 404 Not Found
**(Similar structure as above for error details)**

### 429 Too Many Requests
**(Similar structure as above for error details)**

### 500 Internal Server Error
**(Similar structure as above for error details)**
