Two ways to supply a schema
Inline extraction_schema
Pass the schema as a JSON string in the extraction_schema multipart form field. The schema is used for that single request only and is not saved.
Saved schema (extraction_schema_id)
Save the schema once with POST /v1/extraction-schemas, then reference it by ID. Saved schemas get a stable schm_… ID that you can reuse across many submissions.
1
Create the schema
201 Created):2
Reference by ID at submission time
Field spec reference
Each field infields is a CustomFieldSpec:
Each entry in
tables is a CustomTableSpec:
Validation flags
When a schema is present, Folio compares extracted values against the spec and adds flags to the result:
Both flag types appear in the
flags array of the result and also contribute to review_status. See Confidence and HITL for how flags interact with the human-review workflow.
Managing saved schemas
List
Get by ID
Delete (soft)
422.
Saved schemas are immutable once created. To change a schema, create a new one and update your submissions to reference the new ID.