Skip to main content
POST

Request Body

string
Optional client-provided ID. Format: scope_{uuidv7}
string
required
The scope type ID
string
Display name for the scope
string
External identifier for the scope
object
Optional metadata to associate with the scope
string
Optional parent scope ID. If provided, automatically creates a scope hierarchy edge.
array
Optional array of inline memberships to create with the scope. Each membership has:
  • subjectId (required): The subject to add to this scope
  • roleIds (optional): Array of role IDs to assign to the membership

Response

Returns the created scope object.
You can create a scope with its parent relationship and initial memberships in a single request using parentScopeId and memberships.

Examples

Basic Scope

Scope with Parent

Scope with Memberships and Roles