---
title: "Update a deployment RBAC team"
method: PATCH
path: "/api/permissions/v2/deployments/{deploymentId}/teams/{teamId}"
tags: ["TeamsService"]
---

# Update a deployment RBAC team

`PATCH /api/permissions/v2/deployments/{deploymentId}/teams/{teamId}`

Update a deployment team's name, users, and repositories

## Path parameters

- `deploymentId` integer, required — The unique numerical identifier for the deployment.
- `teamId` integer, required — The unique numerical identifier for the team.

## Request body

- ProtosPermissionsV2UpdateDeploymentTeamRequest
  - `team` ProtosPermissionsV2TeamUpdate — Actions to take to update a team
    - `name` string — Value to change the team's name to. If not specified, the team's name will remain unchanged.
    - `repositories` ProtosPermissionsV2TeamRepositoryAction[] — Repositories to add or remove from the team. Up to 500 unique repositories per request.
      - `repositoryId` string, int64 — The unique identifier of the repository.
      - `action` 'UPDATE_ACTION_ADD' | 'UPDATE_ACTION_UPDATE' | 'UPDATE_ACTION_REMOVE', enum — The action to apply to the repository on the team. UPDATE is not supported. | value | description | |-------|---------------| | UPDATE_ACTION_ADD | Add the given entity to the team | | UPDATE_ACTION_UPDATE | Update information associated with the given entity (e.g. their role) in the team | | UPDATE_ACTION_REMOVE | Remove the given entity from the team |
    - `users` ProtosPermissionsV2TeamUserAction[] — Users to add, remove, or update in the team. Up to 500 unique users per request.
      - `userId` string, int64 — The unique identifier of the user.
      - `action` 'UPDATE_ACTION_ADD' | 'UPDATE_ACTION_UPDATE' | 'UPDATE_ACTION_REMOVE', enum — The action to apply to the user on the team. If the action is UPDATE, the user's role will be updated to the given role. | value | description | |-------|---------------| | UPDATE_ACTION_ADD | Add the given entity to the team | | UPDATE_ACTION_UPDATE | Update information associated with the given entity (e.g. their role) in the team | | UPDATE_ACTION_REMOVE | Remove the given entity from the team |
      - `role` 'TEAM_ROLE_MEMBER' | 'TEAM_ROLE_MANAGER' | 'TEAM_ROLE_READONLY', enum — The user's new or existing role. | value | description | |-------|---------------| | TEAM_ROLE_MEMBER | Indicates the user is a member of the team | | TEAM_ROLE_MANAGER | Indicates the user is a manager of the team | | TEAM_ROLE_READONLY | Indicates the user is a read-only member of the team |

## Response `200`

OK

- ProtosPermissionsV2UpdateDeploymentTeamResponse
  - `team` ProtosPermissionsV2Team — An individual RBAC team
    - `id` string, int64 — The unique numerical identifier for the team.
    - `deploymentId` string, int64 — The unique numerical identifier for the deployment.
    - `name` string — The name of this team.
    - `slug` string — The slug of this team's name.
    - `parentTeamId` string, int64 — The Team ID of this team's parent team. If unset, the team is an organization-level team.
    - `repositoryCount` string, int64 — The number of repositories directly assigned to this team.
    - `userCount` string, int64 — The number of users directly assigned to this team.
    - `childTeamCount` string, int64 — The number of teams directly assigned to this team.
    - `isProjectDefault` boolean — Whether new repositories are automatically assigned to this team.
    - `isUserDefault` boolean — Whether new users are automatically assigned to this team.
    - `authorizedScopes` string[] — The scopes the the caller has for this team. | value | description | |-------|---------------| | TEAM_SCOPE_DIRECT_MEMBER | Indicates that the user is a direct member of the team | | TEAM_SCOPE_MANAGE | Indicates that the user can manage the team |

---

[API](https://skmtc.net/semgrep/apis/semgrep-web-app.md) · [All operations](https://skmtc.net/semgrep/apis/semgrep-web-app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/semgrep/semgrep-web-app/versions/6483eeecd582/schema)
