# Change workspace teams teamId

Rename a team, change its lead, or re-parent it — all three optional. The EMPTY STRING is how a field is cleared: "" for leadAccountId leaves the team leaderless, "" for parentTeamId puts it back at the top. Admin only; 409 on a duplicate name.

Access class: `workspace:admin`.

## Endpoint

`PATCH /v1/workspace/teams/{teamId}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| teamId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "leadAccountId": "",
    "name": "string",
    "parentTeamId": ""
  },
  "params": {
    ":teamId": ""
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "createdAt": "string",
    "id": "",
    "leadAccountId": "",
    "memberIds": [
      "string"
    ],
    "name": "string",
    "parentTeamId": ""
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
