Skip to main content

Get / Update / Delete Gate

Manage a review gate by UUID: GET returns the gate with its active rules, PUT patches only the keys sent, DELETE soft-deletes without losing recorded decisions.

/v1/structuring/gates/{id} manages a single review gate. GET returns the gate with its active rules embedded — the same shape as the list route, for one gate. PUT applies a partial update to gate properties (name, on_approve, on_flag, auto_approve_after_hours, destination_id, is_active); the schema scope is fixed at creation. DELETE soft-deletes the gate by setting is_active to false.

PUT patches only the keys you send, and rule management is deliberately not part of it: rules are attached and removed through their own routes (POST /v1/structuring/gates/{id}/rules, DELETE .../rules/{ruleId}), so a gate update can never accidentally drop thresholds. A PUT response echoes the gate but with an empty rules array — re-fetch with GET when you need the gate together with its current rule set.

The most useful PUT lever in day-to-day operation is is_active. Setting it false pauses the gate — new results for the schema stop being evaluated by it (and, if it is the only gate, record approval status none) — while everything the gate already queued stays actionable. Setting it back true resumes evaluation from the next result. This makes incident response cheap: pause the gate, drain the queue, resume.

Pausing a gate does not auto-approve the results that arrive while it is paused — they simply record no decision from this gate (approval status none when no other gate covers the schema). If your delivery flow exports approved results only, records produced during the pause will not deliver until some gate or reviewer approves them.
GET/v1/structuring/gates/{id}

Body parameters (PUT — all optional)

namestringNew gate name.
on_approvestringNew action label on approval.
on_flagstringNew action label on flag.
auto_approve_after_hoursnumberNew auto-approval window in hours.
destination_iduuidNew associated delivery destination.
is_activebooleanPause (false) or resume (true) gate evaluation; also how a soft-deleted gate is restored.

curl (GET)

curl -s https://api.talonic.com/v1/structuring/gates/4014c518-7f75-425c-bf67-3052464b95a0 \
  -H "Authorization: Bearer tlnc_your_api_key"

Response

Response (GET)

{
  "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": [
    {
      "id": "285aae61-8378-49e2-926a-ac54e4e54853",
      "name": "Row confidence at least 0.85",
      "type": "min_confidence",
      "config": { "min": 0.85 },
      "sort_order": 0
    }
  ],
  "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"
  }
}

Response (DELETE)

{
  "deleted": true
}

Errors

Error responses

400VALIDATION_ERRORThe id path parameter is not a valid UUID, or a body field has the wrong type.
401unauthorizedMissing or invalid API key.
404RESOURCE_NOT_FOUNDReview gate not found or does not belong to your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

DELETE soft-deletes the gate — pending decisions already recorded by it remain and can still be approved or rejected via [POST /v1/structuring/approvals/{id}/approve](approve-reject-result) with this gate's gate_id, so draining an old gate's queue after retiring it is fully supported. Because DELETE is just is_active: false, a later PUT with { "is_active": true } restores the gate with all its rules intact.

Frequently asked questions

Does deleting a gate affect pending review items?+
No. Decisions and queue items the gate already produced remain and can still be approved or rejected against its gate_id. The gate simply stops evaluating new results. Restore it any time with PUT { "is_active": true } — rules included.
Are rules returned on PUT responses?+
A PUT response includes rules as an empty array because the update does not load the rule relation — it does not mean your rules were removed. Re-fetch with GET to see the gate with its current active rules.
Can I change which schema a gate applies to?+
No. user_schema_id is set at creation and is not part of the PUT body. Create a new gate for the other schema and soft-delete the old one if needed.
How do I pause a gate temporarily?+
PUT { "is_active": false }. New results stop being evaluated by the gate immediately, while its already-queued items stay actionable. PUT { "is_active": true } resumes evaluation — this is operationally identical to DELETE-then-restore, but reads more clearly in an audit trail.
Can I point the gate at a different delivery destination?+
Yes — PUT { "destination_id": "<uuid>" } swaps the associated destination without touching rules or queued items. The destination must be one configured under the Delivery API; the association takes effect for output delivered after the update.