createDocumentType
Create a new document type
Create a new document type with a JSON schema, extraction hints, and validation rules for the OCR pipeline.
Non-admin users:
isPublicis forced tofalsesourceis set toUSERcodeTypemust be prefixed with the organization slug (e.g.,orgname_my_type)- At least 3 characters required after the prefix
Admin users:
- Can set
isPublictotrue sourcedefaults toADMIN- No prefix requirement on
codeType
Authorization
ApiKeyAuth Bearer token for API authentication
In: header
Request Body
application/json
Response Body
application/json
getConversionStatus GET
Poll the current status and retrieve the extracted result of an asynchronous document conversion by its ID. **Status flow:** - `ENQUEUED` → `PROCESSING` → `SUCCESS` | `ERROR` **Polling recommendations:** - Poll every 2-3 seconds for active conversions - Stop polling when status is `SUCCESS` or `ERROR` - Maximum processing time: 60 minutes (auto-timeout)
getDocumentType GET
Retrieve the full definition of a single document type by its ID, including its JSON Schema, prompt hints, and conversion settings. Use this endpoint to inspect how a document type extracts data, or to export a type's configuration so you can recreate it elsewhere with `POST /api/document-types` or update it with `PUT /api/document-types/{id}`. **Access rules** — the API key's user can read a document type when any of these hold: - The type is **public and published** (`isPublic: true`, `status: PUBLISHED`). - The user **created** the type. - The user is a **member of the organization** that owns the type. If none apply, the endpoint responds with `404` (the existence of private types is never disclosed). Only public, reusable fields are returned — internal metadata such as the owning organization or creator is omitted.