Skip to main content

Create Check

Create an in-pipeline validation check with POST /v1/structuring/checks. Supports field_format, value_range, cross_field, and ai_coherence check types.

POST /v1/structuring/checks creates a validation check: an in-pipeline data quality rule that runs automatically against future structuring results for one schema. Each check has a type (field_format, value_range, cross_field, or ai_coherence), a severity, and a type-specific config. Newly created checks are active immediately.

The config object shape depends on the check type. For value_range, provide field, min, and max. For field_format, provide field and pattern. For cross_field, provide fields and a rule expression. For ai_coherence, no config is required.
POST/v1/structuring/checks

Body parameters

name*stringCheck name.
type*stringCheck type: field_format, value_range, cross_field, ai_coherence.
user_schema_id*uuidSchema this check is scoped to. Must be a valid UUID.
descriptionstringOptional description.
severitystringSeverity level: warning (default) or error.
configobjectType-specific configuration.

Request body

{
  "name": "Amount range check",
  "type": "value_range",
  "user_schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "config": {
    "field": "total_amount",
    "min": 0,
    "max": 1000000
  }
}

Response

Response fields (201 Created)

idstringCheck UUID.
user_schema_idstring | nullSchema scope, if provided.
namestringCheck name.
descriptionstring | nullOptional description.
typestringCheck type.
severitystringSeverity level.
configobject | nullType-specific configuration.
is_activebooleanAlways true for newly created checks.
sort_orderintegerDisplay and evaluation order.
created_atstringISO 8601 creation timestamp.
updated_atstringISO 8601 last update timestamp.
linksobjectRelated resource URLs (self).

Response (201 Created)

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "user_schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "name": "Amount range check",
  "description": null,
  "type": "value_range",
  "severity": "warning",
  "config": { "field": "total_amount", "min": 0, "max": 1000000 },
  "is_active": true,
  "sort_order": 0,
  "created_at": "2024-09-14T12:00:00.000Z",
  "updated_at": "2024-09-14T12:00:00.000Z",
  "links": {
    "self": "/v1/structuring/checks/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}

Errors

Error responses

400bad_requestValidation failed (missing name, type, or user_schema_id) or no specific organization context available (master-view API key used on a create operation).
401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

Newly created checks are automatically active and evaluate against all future structuring results. Pair this with POST /v1/structuring/gates and POST /v1/structuring/gates/{id}/rules to wire checks into a review gate: checks flag individual fields, while gate rules aggregate check outcomes to decide whether a result needs manual review.