Skip to main content
POST
Create Scope

Create Scope

POST /v1/scopes Creates a custom permission scope for the authenticated tenant. Custom scopes extend the built-in scope registry with tenant-specific permissions. The scope string is automatically composed from the resource and action fields in resource:action format. Custom scopes are validated against the MAIP scope format rules: alphanumeric characters, dots, underscores, hyphens, and asterisks only.
Custom scopes are tenant-isolated. They do not appear in other tenants’ scope registries. Built-in platform scopes cannot be overridden or duplicated.

Authentication

Requires X-API-Key header or Bearer JWT token. Tenant-scoped via X-Tenant-ID.

Request Body

string
required
The resource component of the scope. Must contain only alphanumeric characters, dots, underscores, and hyphens. Examples: "crm", "payment", "inventory.warehouse".
string
required
The action component of the scope. Must contain only alphanumeric characters, dots, underscores, hyphens, and asterisks. Examples: "read", "approve", "*".
string
Human-readable name for the scope. Defaults to the composed resource:action string if omitted.
string
Detailed description of what the scope grants access to.
string
Organizational category for the scope. Defaults to "custom" if omitted. Common values: "data", "model", "tool", "integration", "custom".

Response

string
UUID of the newly created scope definition.
string
UUID of the owning tenant.
string
The composed scope string in resource:action format.
string
The resource component.
string
The action component.
string
Human-readable scope name.
string
Scope description.
string
Scope category.
boolean
Always false for tenant-created scopes.
string
ISO 8601 creation timestamp.

Example


Assigning Custom Scopes to Agents

After creating a custom scope, assign it to agents during registration or via delegation:

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Body

application/json
resource
string
required

Resource component of the scope (e.g. "crm", "payment")

action
string
required

Action component of the scope (e.g. "read", "approve", "*")

display_name
string

Human-readable name for the scope

description
string

Detailed description of what the scope grants

category
string

Organizational category (defaults to "custom")

Response

Scope created

id
string<uuid>
tenant_id
string<uuid>
scope
string
resource
string
action
string
display_name
string
description
string
category
string
is_builtin
boolean
created_at
string<date-time>