Create an operational-administrator role
/portal/v1/accounts/{accountSlug}/admin-rolesAuthentication
Bearer Token
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
Request body
application/json
namestring Required Administrator role name
descriptionstring Optional Administrator role description
scopeenum Required How the role is granted. `account` roles apply account-wide and carry account-global capabilities (Console access, billing, who administers). `environment` roles are granted in one Environment, optionally narrowed to a hierarchy node, and carry the people work scoped to it. Immutable once created.
capabilitiesstring[] Required Capability keys the role grants. Every key must match the role's scope.
Responses
application/json
data *AdminRoleResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X POST "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/admin-roles" \ -H "Authorization: Bearer $CANOPY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "description": "string", "scope": "account", "capabilities": [ "string" ] }'
{ "data": { "id": "string", "name": "string", "description": "string", "is_system": false, "system_key": "string", "is_active": false, "scope": "account", "capabilities": [ "string" ], "assignment_count": 0, "created_at": "2026-04-20T12:00:00.000Z", "updated_at": "2026-04-20T12:00:00.000Z" } }
Tell us how we can improve this guide.