Launch Week 02 wrapped — explore all five launches

Delete Role

DELETEhttps://api.confident-ai.com/v2/projects/{projectId}/roles/{roleId}

Permanently deletes a custom project role. A role that is still assigned to at least one member cannot be deleted — the request fails and you must first move those members onto another role — so deleting a role never silently strips anyone of their access. The policies that were attached to it are not deleted and stay available to other roles in the project. Only roles the project owns can be deleted; a global, system-defined role responds 404.

Warning: This action cannot be undone.

DELETE/v2/projects/{projectId}/roles/{roleId}
curl -X DELETE "https://api.confident-ai.com/v2/projects/{projectId}/roles/{roleId}" \
  -H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "<ROLE-ID>"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • projectIdstringRequired

    The id of the project the role belongs to.

  • roleIdstringRequired

    The id of the project role. It must be a role the project owns; a global, system-defined role is not addressable here.

Response

Delete Role succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Confirmation that the role no longer exists.

    Show 1 propertyHide 1 property
    • idstring

      The id of the role that was deleted.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI