Create role
Creates a new role with ABAC permissions and attributes.
Authorization: Requires admin role in the organisation.
Scope (required):
scope: Either"organisation"or"workspace"scopeId: The org_id or workspace_id (required for both scopes)
Permissions:
Standard permission format: resource:action
- Resources:
users,products,orders,suppliers,workspaces,settings - Actions:
read,write,delete,admin
Body
required
application/json
Responses
- application/scim+json
- application/scim+json
- application/scim+json
- application/scim+json
- application/scim+json
Request Example for post/v2/scim2/Roles
curl https://api.consentio.co/v2/scim2/Roles \
--request POST \
--header 'Content-Type: application/scim+json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"schemas": [
"urn:consentio:params:scim:schemas:Role:1.0"
],
"externalId": "idp-role-purchasing-mgr",
"displayName": "Purchasing Manager",
"description": "Manager with full purchasing and approval rights",
"scope": "organisation",
"scopeId": "org_abc123",
"permissions": [
"products:read",
"products:write",
"orders:read",
"orders:write",
"orders:approve",
"reports:export"
]
}'
{
"schemas": [
"string"
],
"id": "role_purchasing_manager",
"externalId": "idp-role-123",
"displayName": "Purchasing Manager",
"description": "Manager with full purchasing access",
"scope": "organisation",
"scopeId": "org_abc123",
"permissions": [
"orders:approve",
"orders:read",
"orders:write",
"products:read",
"products:write"
],
"attributes": {
"additionalProperty": [
"string"
]
},
"meta": {
"resourceType": "Role",
"created": "2026-11-11T10:14:32.082Z",
"lastModified": "2026-11-11T10:14:32.082Z",
"location": "https://example.com"
}
}