Update Project Role
PUThttps://api.confident-ai.com/v1/projects/{projectId}/roles/{roleId}
Updates a custom project role's name, description, or policies. Global roles cannot be modified.
curl -X PUT "https://api.confident-ai.com/v1/projects/{projectId}/roles/{roleId}" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Analyst",
"description": "Read and comment on project traces",
"policyIds": [
"policy-uuid-1"
]
}'{
"success": true,
"data": {
"role": {
"id": "project-role-uuid-3",
"name": "Analyst",
"description": "Read and comment on project traces",
"projectId": "PROJECT-ID",
"policies": [
{
"id": "policy-uuid-1",
"name": "View traces"
}
]
}
}
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Path parameters
projectIdstringRequiredThe unique identifier of the project.
roleIdstringRequiredThe unique identifier of the role.
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
projectIdstringThe owning project id, or
nullfor global, system-defined roles that are available to every project.policieslist of objectsThe policies attached to this role
Show 2 propertiesHide 2 properties
idstringUnique identifier
namestringName