Skip to content

Copy a policy to a zone

POST/api/public/v1/policies/{public_id}/copy

Creates a new draft in a live Autonomy Zone from the intent policies in force of this AIP (their sentences, answers, rules, cases and citations, marked confirmed), planned in monitor, and answers 201 {draft_public_id, zone_id, org_unit_id}; the draft is read with GET /aip/drafts/{public_id} and ratified like any other. The new AIP has its own id and history, and its provenance names the source (copied_from); evidence stays with the source. Copying into the source's own zone is allowed. Makes no AI call. A retry with the same Idempotency-Key returns the first draft and creates no second one. 409 RETIRED for a deleted source, 404 ZONE_NOT_FOUND, 422 ZONE_UNAVAILABLE for a retired zone.

Terminal window
curl --fail-with-body -X POST 'https://app.openlatch.ai/api/public/v1/policies/<policy_public_id>/copy' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"zone_id":"<zone_id>"}'
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: policies: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
zone_idstring (uuid)Required.
FieldTypeDescription
dataobjectRequired. The new draft: its id, and the zone and unit it was drafted in.
data.draft_public_idstringRequired.
data.org_unit_idstringRequired.
data.zone_idstringRequired.
{
"data": {
"draft_public_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"org_unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"zone_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10"
}
}