Create Organization Role
POSThttps://api.confident-ai.com/v1/organization/roles
Creates a custom organization role from a set of policies. The role name must be unique within your organization and cannot collide with a system-defined role name.
curl -X POST "https://api.confident-ai.com/v1/organization/roles" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Billing Manager",
"description": "Can manage billing only",
"policyIds": [
"policy-uuid-2"
]
}'{
"success": true,
"data": {
"role": {
"id": "role-uuid-3",
"name": "Billing Manager",
"description": "Can manage billing only",
"organizationId": "ORGANIZATION-ID",
"policies": [
{
"id": "policy-uuid-2",
"name": "Manage billing"
}
]
}
}
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Request body
namestringRequiredName of the role (must be unique within the organization and cannot be a system role name)
descriptionstringOptional description of the role
policyIdslist of stringsRequiredThe ids of the policies to attach to this role
Response
successbooleanIndicates if the request was successful
dataobjectShow 1 propertyHide 1 property
roleobjectShow 5 propertiesHide 5 properties
idstringUnique identifier for the role
namestringName of the role
descriptionstringOptional description of the role
organizationIdstringThe owning organization id, or
nullfor global, system-defined roles that are available to every organization.policieslist of objectsThe policies attached to this role
Show 2 propertiesHide 2 properties
idstringUnique identifier
namestringName