Scopes
Create Scopes (Batch)
Create multiple scopes with inline memberships in a single request
POST
Overview
Batch creation allows you to create multiple scopes in a single API call. You can provide client IDs for in-batch references, set up parent relationships, and add memberships with role assignments.ID Format: All IDs use a namespaced UUIDv7 format:
scope_{uuidv7}. You can optionally provide your own IDs for in-batch references.Request Body
Array of scope objects:Optional client-provided ID. Useful for referencing within the same batch.
ID of the scope type
Display name for the scope
External identifier for the scope
Optional metadata to associate with the scope
Optional parent scope ID. Automatically creates a scope hierarchy edge.
Optional array of inline memberships. Each membership has:
subjectId(required): The subject to add to this scoperoleIds(optional): Array of role IDs to assign
Response
Returns an array of created scope objects.Each scope can include
parentScopeId and memberships to set up the complete structure in one request.