---
title: "Create or update org role"
method: PUT
path: "/v1/org-roles"
tags: ["Org Roles", "org"]
---

# Create or update org role

`PUT /v1/org-roles`

## Request

- Base URL: `https://placeholder/v1`
- URL: `https://placeholder/v1/v1/org-roles`
- Auth: none required
- TypeScript: <https://skmtc.dev/northflank/apis/northflank-api/docs/v1/org-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 for the authenticated org.

## 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.
    - `orgScope` string[]: Org-level RBAC permission strings.
  - `restrictions` object: Access restrictions for this role.
    - `enabled` boolean, required
    - `teams` object[]
      - `teamId` string, required
      - `restrictions` object
        - `enabled` boolean, required
        - `projects` string[]
        - `restrictionMode` 'in' | 'notIn'
  - `directoryGroups` string[]: An array of linked directory groups. Users belonging to any of these linked directory groups will automatically be a member of this role.

## Response `200`

Details about the updated org 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)
