Create Gate
Create a review gate with POST /v1/structuring/gates, scoped to one schema. Gates aggregate rule thresholds and control the review workflow.
POST /v1/structuring/gates creates an review gate that controls the flow of structuring results to delivery for one schema. A gate starts with no rules; add rules via the gate rules endpoint to define quality thresholds. The on_approve and on_flag fields control what happens when results pass or fail the gate's rules.
POST /v1/structuring/gates/{id}/rules./v1/structuring/gatesBody parameters
Response
Response fields (201 Created)
Response (201 Created)
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Finance approval gate",
"user_schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"destination_id": null,
"on_approve": "export",
"on_flag": "queue",
"auto_approve_after_hours": null,
"is_active": true,
"rules": [],
"created_at": "2024-09-14T12:00:00.000Z",
"updated_at": "2024-09-14T12:00:00.000Z",
"links": {
"self": "/v1/structuring/gates/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"rules": "/v1/structuring/gates/a1b2c3d4-e5f6-7890-abcd-ef1234567890/rules"
}
}Errors
Error responses
A gate starts with an empty rules array, which means all results auto-approve until you add rules. The typical setup sequence is: create the gate, then immediately call POST /v1/structuring/gates/{id}/rules to add a min_confidence rule with your desired threshold. Optionally set destination_id to route approved results directly to a delivery destination.