Skip to main content
POST
Set direct role grants for a batch of users

Authorizations

Authorization
string
header
required

Organization API key (sl_…).

Headers

x-tenant-id
string
required

The organization ID the request is scoped to.

Body

application/json
email_addresses
string[]
required

Users, by email, whose direct role grants are being set. Each user's existing direct role grants are replaced by those in this request. An address need not belong to an existing member — granting to an invited address takes effect on their first sign-in.

Required array length: 1 - 100 elements
roles
UserRoleGrantCreateV2 · object[]
required

The roles every listed user should directly hold, each with the scope it applies to. Applied identically to every listed user. An empty list clears every listed user's direct role grants.

Maximum array length: 100

Response

Successful Response

items
UserRoleGrants · object[]
required
page_token
string | null

Opaque cursor for the next page; empty/absent on the last page.

row_count
integer | null

Best-effort total for the filtered result set; may be null when expensive.