v22

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-01140308542.4 KB
Zone Roles

Assign role to user

Assigns a role to the user. Provide exactly one of role_id or role_identifier; when role_identifier is used, owner_type is required to disambiguate roles that share an identifier across owner types (and must be omitted with role_id). An optional (scope_type, scope_id) pair scopes the grant; only platform roles on the org zone may carry a scope, and a zone scope must reference a different zone in the same organization.

post/zones/{zoneId}/users/{userId}/roles

Path parameters

zoneIdstring required

Zone ID

userIdstring required

User ID

Request body

role_idstring

ID of the role to assign. Provide exactly one of role_id or role_identifier; owner_type must be omitted when role_id is used.

role_identifierstring

Opaque role identifier. Treated as an opaque identifier by the API and unique within a zone.

owner_type'platform' | 'customer'

Owner type of the role to assign. Required with role_identifier (an identifier is unique only per owner type); must be omitted with role_id.

scope_typestring

The kind of resource to scope the grant to (e.g. zone). Provide together with scope_id, or omit both for an unscoped assignment (applies to the owning zone itself). Only platform roles on the org zone may carry a scope.

scope_idstring

The ID of the resource to scope the grant to. Provide together with scope_type, or omit both for an unscoped assignment. When scope_type is zone, this must reference a different zone in the same organization.

Response

Represents a role assigned to a user within a zone

idstring required

Unique identifier of the role assignment

zone_idstring required

Zone this assignment belongs to

principal_typestring required

The kind of principal the role is assigned to (e.g. user). Always user today.

principal_idstring required

ID of the principal the role is assigned to (e.g. a user ID).

role_idstring required

ID of the assigned role

role_identifierstring required

Opaque role identifier. Treated as an opaque identifier by the API and unique within a zone.

scope_typestring nullable

The kind of resource this grant is scoped to (e.g. zone). Null when the assignment is unscoped (applies to the owning zone itself).

scope_idstring nullable

The ID of the scoped resource. Null when the assignment is unscoped.

created_atstring date-time required

Entity creation timestamp

updated_atstring date-time required

Entity update timestamp