Launch Week 02 wrapped — explore all five launches

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.

PUT/v1/projects/{projectId}/roles/{roleId}
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"
  ]
}'
200
{
  "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_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • projectIdstringRequired

    The unique identifier of the project.

  • roleIdstringRequired

    The unique identifier of the role.

Request body

  • namestringRequired

    Name of the role (must be unique within the organization and cannot be a system role name)

  • descriptionstring

    Optional description of the role

  • policyIdslist of stringsRequired

    The ids of the policies to attach to this role

Response

  • successboolean

    Indicates if the request was successful

  • dataobject

    Show 1 propertyHide 1 property
    • roleobject

      Show 5 propertiesHide 5 properties
      • idstring

        Unique identifier for the role

      • namestring

        Name of the role

      • descriptionstring

        Optional description of the role

      • projectIdstring

        The owning project id, or null for global, system-defined roles that are available to every project.

      • policieslist of objects

        The policies attached to this role

        Show 2 propertiesHide 2 properties
        • idstring

          Unique identifier

        • namestring

          Name

Built byConfident AI