Skip to content

Answer one interview card

POST/api/public/v1/aip/drafts/{public_id}/intent-policies/{intent_policy_id}/answers beta

accept the recommended answer, or change it with values (a dictionary card), question (an agent question card) or fallback Ask or Block (the fallback card). An answer that changes nothing the rules read (an accept, or the value already in force) is only recorded: no job, the revision and confirmed stay. Otherwise the draft's revision moves and the stored cases re-run at once, code-only; cases for added values are then written in the background (busy: topping_up, blocking nothing), or every case again when more than half went stale. 422 UNKNOWN_CARD, 422 INVALID_PATTERN, 503 ENGINE_UNAVAILABLE.

Terminal window
curl --fail-with-body -X POST 'https://app.openlatch.ai/api/public/v1/aip/drafts/<draft_public_id>/intent-policies/<intent_policy_id>/answers' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"card_key":"<card_key>","choice":"accept"}'
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.
intent_policy_idstring (uuid)Required.
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
card_keystringRequired.
choicestring — one of accept, changeRequired.
fallbackstring — one of Ask, Block or null
questionstring or null
valuesarray of string or null
FieldTypeDescription
dataobjectRequired. One intent policy of a draft.
data.busystring or nullWhat 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.capabilitystring or null
data.cardsarray of objectRequired.
data.cards[].answerobject or null
data.cards[].keystringRequired.
data.cards[].kindstring — one of dictionary_values, agent_question, fallbackRequired.
data.cards[].questionstringRequired.
data.cards[].recommendedobjectRequired.
data.casesarray of objectRequired.
data.citationobject or nullRequired. The framework preset rule this intent policy came from, edited when its sentence differs; null for anything not drawn from a framework preset.
data.citation.editedbooleanRequired.
data.citation.entriesarray of objectRequired.
data.citation.itemsarray of objectRequired.
data.citation.license_urlstringRequired.
data.citation.preset_keystringRequired.
data.citation.preset_titlestringRequired.
data.citation.rule_idstringRequired.
data.citation.source_commitstringRequired.
data.citation.source_datestringRequired.
data.citation.source_sentencestringRequired.
data.citation.versioninteger — 1Required.
data.confirmedboolean or null
data.deferredobject or nullThe deferred part's gap class and fallback; null when it has none.
data.deferred.classobject or null
data.deferred.fallbackstring — one of Ask, BlockRequired.
data.dimensionstring — one of quality, economics, security, safety, complianceRequired.
data.fallbackstring — one of Ask, Block or null
data.fixobject or null
data.fix.attempts_leftintegerRequired. How many more fixes may be asked for (aip_draft_fix); the check loop never spends one.
data.fix.availablebooleanRequired.
data.fix.diffobjectRequired.
data.fix.fix_idstringRequired.
data.fix.reasonobject or nullWhy the proposal is not simply the fix: breaks_passing_case (a passing case fails under it), not_enforceable (it grounds to a refusal), unchanged (the same sentence), still_failing (a case still fails with it, or the attempts ran out), refused_rewrite (an enforceable rewrite of a refused sentence); null for a proposal with none of these.
data.fix.requestedbooleanA fix asked for with POST …/fix: applied with fix/apply, which keeps the cases it re-ran. false for the check loop's own suggestion, taken by sending diff.after as the sentence.
data.idstringRequired.
data.job_idstring or null
data.languagestringRequired.
data.passageobject or null
data.passage.endintegerRequired.
data.passage.startintegerRequired.
data.refusalobject or null
data.refusal.classstring — one of nothing_observable, not_agent_controlRequired.
data.refusal.reasonstringRequired.
data.request_ruleobject or null
data.request_rule.leverstring — one of effort_clamp, context_edit, prefix_guardRequired.
data.request_rule.paramsobjectRequired.
data.sentencestringRequired. 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.steerstring or null
data.validateobject or null
data.validate.exampleobject or null
data.validate.fires_on_every_actionbooleanRequired.
data.validate.never_firesbooleanRequired.
{
"data": {
"busy": "string",
"capability": "string",
"cards": [
{
"answer": {
"choice": "accept",
"fallback": "Ask",
"question": "string",
"values": []
},
"key": "string",
"kind": "dictionary_values",
"question": "string",
"recommended": {}
}
],
"cases": [
{}
],
"citation": {
"edited": false,
"entries": [
{
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"title": "string",
"url": "https://app.openlatch.ai/",
"via": {}
}
],
"items": [
{
"key": "string",
"label": "string",
"url": "https://app.openlatch.ai/"
}
],
"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": {
"after": "string",
"before": "string"
},
"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
}
}
}