Skip to main content
Replaces the scope of each listed resource type for everyone holding the role. A scope limits; it never grants more than the role allows. Applies to tenant_admin, tenant_member and custom roles — the owner role cannot be limited (409). Project instances need their workspace_id. The response carries an ETag header (the same value a GET of this resource returns). Send it back in If-Match to make the write conditional: when the resource has changed in the meantime the write is refused with 412 and nothing is changed. The check narrows, but does not fully close, the window for a concurrent overwrite — two writers that pass it at the same instant can both write.
Permission required: policy:manage
  • Changes that give someone an admin role, or that reduce what an admin can reach, also require the team owner or an admin.

Path Parameters

string
required
tenant_admin, tenant_member or a custom role key

Headers

string
Optional. The ETag from a previous read of this resource. The write is refused with 412 when the resource has changed since; omit it to overwrite unconditionally.

Request Body

string
required
Why the change is made; recorded in the audit log. At most 255 bytes (UTF-8).
array
required
Each listed resource type’s scope is replaced by the given one; types not listed keep their current scope.

Response

object

Errors

Errors answer with success: false, a message and an error_code. See Error Codes for every code.