Create Policy
POSThttps://api.confident-ai.com/v2/organization/governance-policies
Creates a governance policy and returns its id. The policy starts with no controls attached and no projects enrolled, so attach controls and enroll projects afterwards through their own endpoints. Send basePolicyIds to have it inherit another policy's controls: inheritance is exactly two levels deep, so every id you send must name a policy that extends nothing itself, and the whole request is rejected if one does. The check and the write run in a single serializable transaction, so two callers creating policies against the same bases at once cannot slip past that rule.
curl -X POST "https://api.confident-ai.com/v2/organization/governance-policies" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "EU AI Act readiness",
"description": "The checks every customer-facing agent must pass before release.",
"basePolicyIds": [
"<GOVERNANCE-POLICY-ID>"
]
}'{
"success": true,
"data": {
"id": "<GOVERNANCE-POLICY-ID>"
},
"link": "https://app.confident-ai.com/organization/<ORGANIZATION-ID>/governance/policies/<GOVERNANCE-POLICY-ID>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Request body
namestringRequiredThe name of the governance policy, unique within your organization.
descriptionstring | nullWhat the policy covers. Omit it, or send null, to leave it unset.
basePolicyIdslist of stringsThe policies this policy extends, whose controls then also apply to its projects. Omit for a standalone policy. Inheritance is exactly two levels deep, so every id here must name a policy that extends nothing itself.
Response
Create Policy succeeded.
successbooleanIndicates if the request was successful.
dataobjectA governance policy, identified by its id.
Show 1 propertyHide 1 property
idstringThe id of the governance policy.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.