updateDocumentType
Update a document type
Update an existing document type's schema, name, description, prompt hints, or validation rules. All fields are optional.
Permissions:
- Non-admin users can only update document types they created
- Non-admin users cannot set
isPublictotrue codeTypeis immutable and will be ignored if provided
When isDraft changes, the status field is automatically updated.
A version snapshot is created with the state before the update.
Authorization
ApiKeyAuth Bearer token for API authentication
In: header
Path Parameters
Document type ID
Request Body
application/json
Response Body
application/json
listDocumentTypes GET
Retrieve the paginated list of document types the user can access, with optional search by name, code, or description. Includes: - Documents created by the user - Documents from the user's organizations - Public published documents (isPublic=true and isDraft=false) Supports pagination and search.
validateDocument POST
Check whether a JSON document satisfies the rules of a document type **without running OCR or storing anything**. Send the data you already extracted (for example, the output of `POST /api/convert`, or values edited by a reviewer) and get back the problems found. Validation runs two layers against the document type: - **JSON Schema** — types, required fields, formats, and value constraints. - **Custom business rules** — cross-field and domain logic defined for the type. Results are split into two buckets, each with a `count` and a list of human-readable `messages`: - **errors** — blocking problems; the document does not conform. - **warnings** — non-blocking issues worth reviewing. A document is valid when `errors.count` is `0`. The call always returns `200` when it runs successfully, even if the document has errors — inspect `errors.count` to decide whether it passed. Access follows the same rules as [`GET /api/document-types/{id}`](#operation/getDocumentType).