Create Gate
Create a review gate with POST /v1/structuring/gates, scoped to one schema. Add rules afterwards to set thresholds; a rule-less gate auto-approves everything.
POST /v1/structuring/gates creates a review gate that decides, per structuring result, whether the record auto-approves or is flagged for manual review. A gate is scoped to one schema and starts with no rules; attach rules via [POST /v1/structuring/gates/{id}/rules](gate-rules) to define the actual thresholds. The on_approve and on_flag fields are action labels recorded on the gate (defaults export and queue) that downstream tooling reads to decide what passing and flagged results should do.
Gate evaluation runs automatically after a result's validation checks complete: every active rule must pass for the gate to record an auto_approved decision; any failing rule records a pending decision carrying per-rule outcomes and a validation summary. Because rules are ANDed, model your policy as a small set of independent conditions — e.g. one min_confidence rule plus one validation_pass rule — rather than one complex rule.
/v1/structuring/gatesBody parameters
curl
curl -s -X POST https://api.talonic.com/v1/structuring/gates \
-H "Authorization: Bearer tlnc_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Finance approval gate",
"user_schema_id": "36ef3a00-a4dc-4e49-af6a-66ae20f9b58a",
"auto_approve_after_hours": 24
}'Response
Response fields (201 Created)
Response (201 Created)
{
"id": "4014c518-7f75-425c-bf67-3052464b95a0",
"name": "Finance approval gate",
"user_schema_id": "36ef3a00-a4dc-4e49-af6a-66ae20f9b58a",
"destination_id": null,
"on_approve": "export",
"on_flag": "queue",
"auto_approve_after_hours": 24,
"is_active": true,
"rules": [],
"created_at": "2026-08-29T11:35:09.040Z",
"updated_at": "2026-08-29T11:35:09.040Z",
"links": {
"self": "/v1/structuring/gates/4014c518-7f75-425c-bf67-3052464b95a0",
"rules": "/v1/structuring/gates/4014c518-7f75-425c-bf67-3052464b95a0/rules"
}
}Errors
Error responses
The typical setup sequence is: create the gate, then immediately add a min_confidence rule (config key min, e.g. { "min": 0.85 }) and a validation_pass rule ({ "scope": "all", "max_failures": 0 }). From then on, low-confidence rows and rows with failing checks park as pending decisions, visible check-by-check in the [pending review queue](pending-approvals), while clean rows auto-approve without human touch.
Gates only govern results produced after they exist — creating a gate does not retroactively evaluate earlier runs, and deleting one does not retract decisions it already recorded. When rolling a gate out over live traffic, create it with rules attached in the same maintenance window as your check changes, so every result in a run is judged by the same policy.