Roles
Overview
The Roles API lists the roles you can assign to accounts and groups. Role definitions are built into Material and can't be created or changed. This catalog exists so you can discover the assignable role IDs on your instance without hardcoding them.
List Roles (
GET /api/v1/roles): the assignable roles on your instance, with each one's ID, display name, description, and scope
Role assignments are managed through the account and group update endpoints, using the roles field of Update Account and Update Group. For what each role can do, see Role Descriptions.
Scope is part of the role ID
Each ID names a role and the scope it applies at, mirroring the role list under Edit Roles (Explorer > Accounts). The flavor field reports which of the three it is:
Tenant-scoped IDs (
flavor: "tenant"), such asanalyst,tenant_admin, andcontent_admin, requiretenantswhen assigned.Global IDs (
flavor: "global"), such assuper_adminandglobal_analyst, apply to every tenant and rejecttenants.Individual IDs (
flavor: "individual"), currently justtenant_enroller, grant no tenant access and take notenants.
So the ID alone tells you how to construct a valid assignment, with no catalog lookup needed. Instances that disable global roles omit the global IDs from this catalog entirely and reject them on assignment. This response contains no tenant IDs, which appear only in assignment payloads.
Assigning and removing
roles takes assign and remove blocks, and only the roles you name are touched. It isn't a full-set replacement, so a tenant-scoped token can't accidentally clear assignments it can't see. Assigning a tenant-scoped role the account or group already holds replaces its tenant list, removing a role it doesn't hold does nothing, and naming the same ID in both blocks returns a 400.
Removal applies at every scope the role is held, so to narrow a tenant-scoped role rather than drop it, re-assign it with a shorter tenants list instead of removing it.
Roles read back on the account and group resources carry a source: direct (assigned on that account), group (inherited from the group named in groupId, and changeable only on that group), or tenant (granted to everyone in the tenant). A role reported with tenants: "all" was granted across every tenant, which you can read here but can't assign through this API.
Permissions
Reading this catalog needs the same read permission as accounts and groups. Changing assignments additionally requires role-management permission, and you can only grant roles you're allowed to bind yourself: a tenant administrator can't grant Super Admin, or grant anything outside their own tenants.
Be careful here. Nothing stops you from removing your own access or the last Super Admin, and either is irreversible without Material support.
Response Structure
The catalog follows the standard two-part structure: a meta object (with totalCount, limit, hasMore, and nextCursor) and an items array of role objects. The catalog is small and fixed, so this endpoint takes pagination only and no filters.
Want a walkthrough?
Review Hello World.
Pagination and Rate Limiting
Material APIs use cursor-based pagination: pass the
nextCursorvalue from one response as thecursorparameter in the next request.The
limitparameter controls page size and is locked into the cursor, so later pages keep the page size of the first request.When
hasMoreis false andnextCursoris null, you've reached the last page.
Lists the roles that can be assigned to accounts and groups on this instance. Role definitions are built in, so only assignments are managed through the API, using the roles field of the account and group update endpoints. A role ID carries its scope: tenant-scoped IDs require tenants when assigned, while IDs that apply everywhere take none. Instances that disable global roles omit the global IDs entirely. The response contains no tenant IDs.
Material Security API key
The pagination cursor returned in a previous response. Pass this value to retrieve the next page of results.
eyJ2IjoxLCJvIjoyNSwibCI6MjV9The maximum number of items to return per page.
25Successful response
Bad request: invalid parameters or request body
Unauthorized: missing or invalid API key
Forbidden: the API key doesn't have permission to perform this action
Not found: the requested resource doesn't exist
Too many requests: the client has exceeded a rate limit and should retry later
Internal server error
GET /api/v1/roles HTTP/1.1
Host: your-instance.on.material.security
x-material-client-secret: YOUR_API_KEY
Accept: */*
{
"meta": {
"totalCount": 1,
"limit": 1,
"hasMore": true,
"nextCursor": "text"
},
"items": [
{
"id": "analyst",
"name": "Analyst",
"description": "Investigate and respond to issues within assigned tenants.",
"flavor": "tenant"
}
]
}Last updated
Was this helpful?

