Ir al contenido

Delete a policy

DELETE/api/public/v1/policies/{public_id}

Deletes it (the one exit of an AIP): it stops running in its Autonomy Zone and cannot be used again — the history is kept, because the decisions it already made are evidence, and the deleted AIP stays readable from GET /policies/{public_id}. To run its rules in another zone, copy it first with POST /policies/{public_id}/copy. A zone_id that holds no attachment of it answers 409 INHERITED_HERE. An agent (OAuth) caller must send the version of the policy it read as a query parameter: missing answers 428 POLICY_VERSION_REQUIRED, one that is no longer current 409 POLICY_VERSION_STALE; an already-retired policy is checked too.

Ventana de terminal
curl --fail-with-body -X DELETE 'https://app.openlatch.ai/api/public/v1/policies/<policy_public_id>' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Rol en la organizaciónEste punto de conexión
ownerPermitido
adminPermitido
editorPermitido
viewerNo permitido

Una clave tiene el rol que su propietario ocupa en la organización. Consulte Autenticación.

Ámbito de la clave de API: policies:write

ParámetroTipoDescripción
public_idstringObligatorio.
ParámetroTipoDescripción
zone_idstring (uuid) or null
versioninteger or nullThe version of the policy the caller read; required of an agent (OAuth) caller.
ParámetroTipoDescripción
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.
CampoTipoDescripción
public_idstringObligatorio.
retired_atstring or null
statusstringObligatorio.
{
"public_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"retired_at": "2026-01-15T14:32:05Z",
"status": "string"
}