Grant an operational administrator
/portal/v1/accounts/{accountSlug}/admin-assignmentsAuthentication
Bearer Token
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
Request body
application/json
userIdstring Required User receiving the administrator role
adminRoleIdstring Required Administrator role to grant
environmentIdstring Optional Environment the authority applies within — omitted for an account-wide grant
scopeTypeenum Required How far the authority reaches: the whole Account, one Environment, or one hierarchy node and its descendants. Must match the role's scope.
nodeIdstring Optional Hierarchy node — required when scopeType is 'node'
effectiveFromstring Optional When the authority becomes effective
effectiveTostring Optional When the authority expires
Responses
application/json
data *AdminAssignmentResponseDto
application/json
error *ApiErrorBodyDto
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-assignments" \ -H "Authorization: Bearer $CANOPY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "userId": "string", "adminRoleId": "string", "environmentId": "string", "scopeType": "account", "nodeId": "string", "effectiveFrom": "string", "effectiveTo": "string" }'
{ "data": { "id": "string", "admin_role_id": "string", "user_id": "string", "environment_id": "string", "scope_type": "account", "application_node_id": "string", "effective_from": "2026-04-20T12:00:00.000Z", "effective_to": "2026-04-20T12:00:00.000Z", "revoked_at": "2026-04-20T12:00:00.000Z", "created_at": "2026-04-20T12:00:00.000Z", "updated_at": "2026-04-20T12:00:00.000Z" } }
Tell us how we can improve this guide.