Take one intent policy out of a draft
DELETE/api/public/v1/aip/drafts/{public_id}/intent-policies/{intent_policy_id} beta
It leaves the draft and the ratify count, and the draft's revision moves; on an edit draft the live AIP keeps it until the draft is ratified. 409 GROUNDING_IN_FLIGHT while it is being grounded.
curl --fail-with-body -X DELETE 'https://app.openlatch.ai/api/public/v1/aip/drafts/<draft_public_id>/intent-policies/<intent_policy_id>' \ -H "Authorization: Bearer $OPENLATCH_API_KEY"import jsonimport osimport urllib.request
request = urllib.request.Request( 'https://app.openlatch.ai/api/public/v1/aip/drafts/<draft_public_id>/intent-policies/<intent_policy_id>', method='DELETE', headers={ 'Authorization': 'Bearer ' + os.environ['OPENLATCH_API_KEY'], },)with urllib.request.urlopen(request) as response: text = response.read().decode() print(json.dumps(json.loads(text), indent=2) if text else response.status)#!/usr/bin/env bashset -euo pipefail
curl -sS --fail-with-body -X DELETE 'https://app.openlatch.ai/api/public/v1/aip/drafts/<draft_public_id>/intent-policies/<intent_policy_id>' \ -H "Authorization: Bearer $OPENLATCH_API_KEY" | jq .$headers = @{ Authorization = "Bearer $env:OPENLATCH_API_KEY"}Invoke-RestMethod -Method DELETE -Uri 'https://app.openlatch.ai/api/public/v1/aip/drafts/<draft_public_id>/intent-policies/<intent_policy_id>' -Headers $headers | ConvertTo-Json -Depth 20Authorization
Section titled “Authorization”| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
editor | Allowed |
viewer | Not allowed |
A key carries the role its owner holds in the organization. See Authentication.
API key scope: aip:write
Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
public_id | string | Required. |
intent_policy_id | string (uuid) | Required. |
Header parameters
Section titled “Header parameters”| Parameter | Type | Description |
|---|---|---|
Idempotency-Key | string or null | Optional. 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. |
Response
Section titled “Response”- 200 OK — the call succeeded.
- 401 Unauthorized —
UNAUTHORIZED - 402 Payment Required —
license_expired - 403 Forbidden —
FEATURE_DISABLED,FORBIDDEN,INSUFFICIENT_SCOPE - 404 Not Found —
NOT_FOUND - 409 Conflict —
GROUNDING_IN_FLIGHT,IDEMPOTENCY_IN_PROGRESS - 422 Unprocessable Content —
IDEMPOTENCY_KEY_REUSED,INVALID_ID,VALIDATION_ERROR - 429 Too Many Requests —
TOO_MANY_REQUESTS - 500 Internal Server Error —
INTERNAL_SERVER_ERROR,tenant_isolation_violation - 503 Service Unavailable —
FEATURE_STATE_UNAVAILABLE,SERVICE_UNAVAILABLE
Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
data | object | Required. One draft: its intent policies, revision, zones, mode, preparation, replay and, for an edit draft, the live version it was opened from. |
data.ask_behaviour_override | string — one of pass_and_review, hold_until_validated or null | The AIP's own Ask behaviour ratify gives it; null follows the Autonomy Zone. |
data.ask_mode_override | string — one of platform, agent, both or null | The AIP's own Ask delivery ratify gives it; null follows the Autonomy Zone. |
data.edit_of | object or null | |
data.edit_of.version | integer | Required. |
data.from_framework_preset | boolean | Required. True when an intent policy of the draft holds a framework citation, edit drafts included. |
data.intent_policies | array of object | Required. |
data.intent_policies[].busy | object or null | What runs on the intent policy: grounding, cases (its stored cases checked again), fix, or topping_up (cases written for the values an answer added, appended when ready; it blocks nothing). |
data.intent_policies[].capability | object or null | |
data.intent_policies[].cards | array of object | Required. |
data.intent_policies[].cases | array of object | Required. |
data.intent_policies[].citation | object or null | Required. The framework preset rule this intent policy came from, edited when its sentence differs; null for anything not drawn from a framework preset. |
data.intent_policies[].confirmed | object or null | |
data.intent_policies[].deferred | object or null | The deferred part's gap class and fallback; null when it has none. |
data.intent_policies[].dimension | string — one of quality, economics, security, safety, compliance | Required. |
data.intent_policies[].fallback | object or null | |
data.intent_policies[].fix | object or null | |
data.intent_policies[].id | string | Required. |
data.intent_policies[].job_id | object or null | |
data.intent_policies[].language | string | Required. |
data.intent_policies[].passage | object or null | |
data.intent_policies[].refusal | object or null | |
data.intent_policies[].request_rule | object or null | |
data.intent_policies[].sentence | string | Required. The intent policy. Empty while the drafting job still prepares it (busy is grounding and it holds no grounding yet): a sentence is served only once it is final. |
data.intent_policies[].steer | object or null | |
data.intent_policies[].validate | object or null | |
data.language | string | Required. |
data.mode | string — one of disabled, monitor, enforce or null | |
data.mode_advice | string or null | Required. The Monitor line on a draft newly made from a framework preset; null otherwise and on edit drafts. |
data.preparation | object | Required. |
data.preparation.error | object or null | |
data.preparation.remaining | array of string — one of ground, test, pack, replay | Required. |
data.preparation.revision | integer or null | |
data.preparation.state | string — one of idle, running, ready, failed | Required. |
data.preparation.steps_done | integer | Required. |
data.preparation.steps_total | integer | Required. |
data.public_id | string | Required. |
data.replay | object or null | |
data.replay.rows | array of object | |
data.replay.state | string — one of running, done, engine_unavailable, empty | Required. |
data.replay.summary | object or null | The replay's figures over all total rows; null while it runs. |
data.replay.total | integer | |
data.revision | integer | Required. |
data.source_kind | string | Required. |
data.unavailable_zones | array of object | |
data.unavailable_zones[].name | object or null | |
data.unavailable_zones[].reason | string — one of deleted, cannot_take_policy | Required. |
data.unavailable_zones[].since | object or null | |
data.unavailable_zones[].zone_id | string | Required. |
data.zone_ids | array of string | Required. |
Example response
Section titled “Example response”{ "data": { "ask_behaviour_override": "pass_and_review", "ask_mode_override": "platform", "edit_of": { "version": 3 }, "from_framework_preset": false, "intent_policies": [ { "busy": "string", "capability": "string", "cards": [ { "answer": {}, "key": "string", "kind": "dictionary_values", "question": "string", "recommended": {} } ], "cases": [ {} ], "citation": { "edited": false, "entries": [ {} ], "items": [ {} ], "license_url": "https://app.openlatch.ai/", "preset_key": "string", "preset_title": "string", "rule_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10", "source_commit": "string", "source_date": "string", "source_sentence": "string", "version": 1 }, "confirmed": false, "deferred": { "class": "string", "fallback": "Ask" }, "dimension": "quality", "fallback": "Ask", "fix": { "attempts_left": 3, "available": false, "diff": {}, "fix_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10", "reason": "Never push to main without a review.", "requested": false }, "id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10", "job_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10", "language": "string", "passage": { "end": 3, "start": 3 }, "refusal": { "class": "nothing_observable", "reason": "Never push to main without a review." }, "request_rule": { "lever": "effort_clamp", "params": {} }, "sentence": "string", "steer": "string", "validate": { "example": "string", "fires_on_every_action": false, "never_fires": false } } ], "language": "string", "mode": "disabled", "mode_advice": "string", "preparation": { "error": { "code": "NOT_FOUND", "message": "Never push to main without a review." }, "remaining": [ "ground" ], "revision": 3, "state": "idle", "steps_done": 3, "steps_total": 3 }, "public_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10", "replay": { "rows": [ { "event_id": "evt_01jbwa2k1vfrn9y42xhgxhmzj2", "occurred_at": "2026-01-15T14:32:05Z", "platform": "string", "readable": false, "recorded_verdict": "string", "verdict": "string" } ], "state": "running", "summary": {}, "total": 0 }, "revision": 3, "source_kind": "string", "unavailable_zones": [ { "name": "release-bot", "reason": "deleted", "since": "2026-01-15T14:32:05Z", "zone_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10" } ], "zone_ids": [ "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10" ] }}