Migrating from schemas
/v1/schemas stored a bare JSON Schema and schema=<name> on POST /v1/extract asked the model to fill it. Extractors replace that. The old endpoints and the schema parameter keep working through a compatibility layer, are marked deprecated, and will be removed two releases after this one, with a changelog notice before each step.
What changed
Section titled “What changed”| Before | Now |
|---|---|
POST /v1/schemas stored a new schema version |
Still accepted. It converts the JSON Schema to an extractor definition, creates the extractor if the name is new (or un-archives it), replaces its draft and publishes a new version in one step. The response keeps id, name, version, json_schema and adds extractor and deprecated |
GET /v1/schemas listed every schema version |
Still accepted. Lists each published, non-archived extractor once with its current version and the JSON Schema of its output (data), not the stored input. Adds extractor on each row and a deprecated note on the list |
schema=<name> on extract |
Still accepted as an alias for extractor=<name>, including name@3 and name@draft |
fields object shaped like the schema |
The result has an extraction object instead; your values are in extraction.data. fields is no longer populated when an extractor runs |
Unknown schema name fell back to generic fields=true |
Unknown name is 404 extractor_not_found; an extractor with no published version is 409 extractor_unpublished |
| Schemas could not be updated or deleted | Extractors have an editable draft, immutable versions, rollback and archive |
Names: 1 to 80 characters of [A-Za-z0-9_-] |
Names: ^[a-z][a-z0-9_-]{0,63}$. The compatibility endpoints lowercase what you send; a name with other characters is 422 validation_error |
POST /v1/schemas needed extract:write; GET needed any key |
Unchanged for the deprecated endpoints. The new /v1/extractors endpoints need extractors:read and extractors:write; see Keys and scopes |
Ids sch_… |
The id returned is the extractor’s ext_… id |
Posting the same name again still creates the next version, as before, so a deploy script that re-posts its schema keeps working.
How a JSON Schema maps to fields
Section titled “How a JSON Schema maps to fields”Each top-level property becomes a field. Property names are slugged to field-name rules (Invoice Number becomes invoice_number; a name that collides with a reserved word such as status gets a _value suffix); required and description carry over.
| JSON Schema | Field |
|---|---|
"type": "string" |
string |
"type": "string", "format": "date" |
date |
"type": "string", "format": "date-time" |
datetime |
"type": "number" or "integer" |
number |
"type": "boolean" |
boolean |
"enum": [...] (any type) |
enum with those values as strings |
"type": "object" with properties |
object with the same mapping inside |
"type": "array" of objects |
group with the item properties as members |
"type": "array" of scalars |
group with a single member named value |
Anything else, or a type list such as ["string", "null"] |
string (the non-null type when there is one) |
The resulting definition has no document check, no rules, output.on_reject: "result" and evidence on. Read it back with GET /v1/extractors/{name} and improve it from there: add a document description, aliases, money and currency types instead of number and string, and the rules you used to check in your own code.
What to change
Section titled “What to change”- Switch the parameter. Send
extractor=instead ofschema=. Same values, same place. - Read
extraction.datainstead offields. The shape is the one you declared, with normalised values: dates asYYYY-MM-DD, money as numbers, enums as your values. Checkextraction.statusbefore trusting the data and routeflaggedruns to review; see Status. - Handle the new errors.
404 extractor_not_foundand409 extractor_unpublishedare synchronous responses toPOST /v1/extract;422 document_mismatchappears once you add adocumentblock. See Errors. - Create and manage with
/v1/extractors.POST /v1/extractorswith adefinition, thenPUT .../draftandPOST .../publish. Keep version pins (@3) in the name you pass rather than in the extractor’s name. - Pin where it matters. Before, extraction always used the highest version. Now bare
extractor=namestill does, but a production integration can pinname@3and upgrade on its own schedule.
Keys and scopes
Section titled “Keys and scopes”Keys created before this release do not have extractors:read and extractors:write. They can still call POST /v1/extract with extractor= or schema= (that needs only extract:write) and the deprecated /v1/schemas endpoints, but calls to /v1/extractors from such a key answer 403 insufficient_scope. Create a new key, which has both scopes by default, or add them when creating one; scopes cannot be edited on an existing key.
Timeline
Section titled “Timeline”| Release | /v1/schemas and schema= |
|---|---|
| This one (4 Dec 2026) | Work through the compatibility layer; marked deprecated in the OpenAPI document and these docs |
| Next | Unchanged, still deprecated |
| The one after | Removed. schema= is ignored, /v1/schemas answers 404 not_found |