---
title: "Create or Update a Role Assignment for a Team"
method: PUT
path: "/roles/assignments/teams"
tags: ["Roles"]
---

# Create or Update a Role Assignment for a Team

`PUT /roles/assignments/teams`

Currently supports organization or environment scope assignments only. Specifying `environmentId` or `organizationId` is required.

## Request body

- RolesApiUpsertTeamRoleAssignmentRequestBody
  - `teamId` string, required
  - `role` union, required
    - string
    - string
    - string
    - string
  - `environmentId` string
  - `organizationId` string
  - `projectId` string

## Response `200`

- RolesApiUpsertTeamRoleAssignmentResponse
  - `inherited` boolean
  - `projectId` string
  - `environmentId` string
  - `teamId` string
  - `role` union
    - string
    - string
    - string
    - string
  - `organizationId` string
  - `id` string

---

[API](https://skmtc.net/envzero/apis/env0-api.md) · [All operations](https://skmtc.net/envzero/apis/env0-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/envzero/env0-api/versions/513441cbe9dc/schema)
