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

# Create a deployment RBAC team

`POST /api/permissions/v2/deployments/{deploymentId}/teams`

Create a new Role-Based Access Control team for a deployment

## Path parameters

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

## Request body

- ProtosPermissionsV2CreateDeploymentTeamRequest
  - `team` ProtosPermissionsV2TeamCreate
    - `name` string — The name to assign to the new team.
    - `repositoryIds` string[] — The IDs of the repositories to assign to the new team.
    - `users` ProtosPermissionsV2TeamCreateUserAction[] — Users to assign to the new team.
      - `userId` string, int64 — The unique identifier of the user.
      - `role` 'TEAM_ROLE_MEMBER' | 'TEAM_ROLE_MANAGER' | 'TEAM_ROLE_READONLY', enum — The user's 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 |
    - `parentTeamId` string, int64 — The Team ID under which to nest the new team. Up to 3 levels of nesting are supported. If not provided, the team will be an organization-level team.

## Response `200`

OK

- ProtosPermissionsV2CreateDeploymentTeamResponse
  - `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)
