Roles
Create organization role
Creates a new role within the specified organization with basic configuration including name, display name, description, and permissions. Use this endpoint to define custom roles that can be assigned to users within the organization. You can create hierarchical roles by extending existing roles and assign specific permissions to control access levels. The role will be scoped to the organization and can be used for organization-specific access control.
post/api/v1/organizations/{org_id}/roles
Path parameters
org_idstring required
Unique identifier of the organization
Request body
Example request
{
"description": "Organization Viewer Role will be used only for viewing the objects",
"display_name": "Organization Viewer Role",
"extends": "admin_role",
"name": "org_viewer_role",
"permissions": [
"read:users",
"write:documents"
]
}Response
Organization role created successfully. Returns the complete role object with system-generated ID and timestamps.
Example response
{
"role": {
"default_creator": true,
"default_member": true,
"dependent_roles_count": 3,
"description": "Can create, edit, and publish content but cannot delete or manage users",
"display_name": "Content Editor",
"extends": "admin_role",
"id": "role_1234abcd5678efgh",
"is_org_role": true,
"name": "content_editor",
"permissions": [
{
"description": "Read Content",
"name": "read:content",
"role_name": "admin_role"
},
{
"description": "Write Content",
"name": "write:content",
"role_name": "editor_role"
}
]
}
}