Launch Week 02 wrapped — explore all five launches

Create Project Policy

POSThttps://api.confident-ai.com/v1/projects/{projectId}/policies

Creates a custom project policy from a set of permissions. Use GET /v1/organization/permissions to discover assignable permission ids.

POST/v1/projects/{projectId}/policies
curl -X POST "https://api.confident-ai.com/v1/projects/{projectId}/policies" \
  -H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "View traces",
  "description": "Grants read access to traces",
  "permissionIds": [
    "perm-uuid-1"
  ]
}'
200
{
  "success": true,
  "data": {
    "policy": {
      "id": "policy-uuid-1",
      "name": "View traces",
      "description": "Grants read access to traces",
      "permissions": [
        {
          "id": "perm-uuid-1",
          "name": "trace:read"
        }
      ]
    }
  }
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • projectIdstringRequired

    The unique identifier of the project.

Request body

  • namestringRequired

    Name of the policy

  • descriptionstring

    Optional description of the policy

  • permissionIdslist of stringsRequired

    The ids of the permissions granted by this policy

Response

  • successboolean

    Indicates if the request was successful

  • dataobject

    Show 1 propertyHide 1 property
    • policyobject

      Show 4 propertiesHide 4 properties
      • idstring

        Unique identifier for the policy

      • namestring

        Name of the policy

      • descriptionstring

        Optional description of the policy

      • permissionslist of objects

        The permissions granted by this policy

        Show 2 propertiesHide 2 properties
        • idstring

          Unique identifier

        • namestring

          Name

Built byConfident AI