---
title: "Create or update role"
method: PUT
path: "/v1/teams/{teamId}/roles"
tags: ["Team Roles", "team"]
---

# Create or update role

`PUT /v1/teams/{teamId}/roles`

## Request

- Base URL: `https://placeholder/v1`
- URL: `https://placeholder/v1/v1/teams/{teamId}/roles`
- Auth: none required
- TypeScript: <https://skmtc.dev/northflank/apis/northflank-api/docs/v1/teams/:teamId/roles/put.ts> (a function with typed inputs; its response is checked against the schema)

Creates role or updates all user-editable fields on a platform role.

## Path parameters

- `teamId` string, required: ID of the team

## Request body

- object
  - `name` string, required: The name of the role.
  - `description` string: A description of the role.
  - `permissions` object: Permissions granted by this role.
    - `teamScope` string[]: Team-level RBAC permission strings.
    - `projectScope` string[]: Project-level RBAC permission strings.
  - `restrictions` object: Project access restrictions for this role.
    - `enabled` boolean, required
    - `projects` string[]
    - `restrictionMode` 'in' | 'notIn'

## Response `200`

Details about the updated team role.

---

[API](https://skmtc.dev/northflank/apis/northflank-api.md) - [All operations](https://skmtc.dev/northflank/apis/northflank-api/llms.txt) - [OpenAPI document](https://skmtc.dev/northflank/apis/northflank-api/revisions/503a425aa44f?raw)
