Skip to content

Ratify and activate a draft

POST/api/public/v1/aip/drafts/{public_id}/ratify beta

Ratifies at once every intent policy confirmed on the draft whose capability is enforce or defer, and attaches the AIP to the one zone saved on the draft in its mode (409 ONE_ZONE_PER_AIP for more); the refused and left-out intent policies are dropped. For an edit draft, a new version of the same AIP. An agent (OAuth) caller must send sentences, the exact sentences this puts in force: 428 SENTENCES_REQUIRED without them, 409 SENTENCES_MISMATCH unless they match.

Terminal window
curl --fail-with-body -X POST 'https://app.openlatch.ai/api/public/v1/aip/drafts/<draft_public_id>/ratify' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"revision":<revision>,"sentences":<sentences>}'
Role in the organizationThis endpoint
ownerAllowed
adminAllowed
editorAllowed
viewerNot allowed

A key carries the role its owner holds in the organization. See Authentication.

API key scope: aip:write

ParameterTypeDescription
public_idstringRequired.
ParameterTypeDescription
Idempotency-Keystring or nullOptional. Makes the request safe to retry: the same key and the same request, within 24 hours, returns the stored response with Idempotent-Replayed: true and runs once.
FieldTypeDescription
revisionintegerRequired.
sentencesarray of string or nullThe exact sentences this call puts in force, as shown to the user. Required of an agent (OAuth) caller: 428 SENTENCES_REQUIRED without them, 409 SENTENCES_MISMATCH unless they match the sentences put in force (the same sentences, order ignored, each as many times as it appears, after Unicode NFC and whitespace normalisation).
FieldTypeDescription
dataobjectRequired.
data.droppedarray of stringRequired.
data.policy_public_idstringRequired.
data.ratifiedarray of stringRequired.
data.versionintegerRequired.
{
"data": {
"dropped": [
"string"
],
"policy_public_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"ratified": [
"string"
],
"version": 3
}
}