Documents

Save an extraction schema

Saves version 1 of a new schema under a generated schema_id. POST /v1/documents/extract can then name it with schema_id instead of sending schema inline. Free, and works at any balance.

  • Access: only this account can see or use it.
  • Changes: schemas can't be edited. Add a version instead.
  • Retention: the schema, with every version, is kept until you delete it or close your account.
  • Retries: a retried create saves a second schema.
post/v1/extraction-schemas

Request

Request body

namestring required
descriptionstring
schemaobject required

The JSON Schema of the fields to extract, as schema takes it on an extract.

Response

The saved schema.

schema_idstring required

Stable id of the schema across its versions (sch_...).

namestring required
descriptionstring nullable
versioninteger required
owner'account' | 'platform' required

account for a schema this account saved.

created_atstring date-time required
updated_atstring date-time required
schemaobject

The version's JSON Schema. Always present on a single schema, a version and a list of versions; GET /v1/extraction-schemas leaves it out.

Changes

No recorded changes to this operation across all 1 revision of this API.