getDocumentType
Get a document type by ID
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.
Authorization
ApiKeyAuth Bearer token for API authentication
In: header
Path Parameters
Document type ID
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
createDocumentType POST
Create a new document type with a JSON schema, extraction hints, and validation rules for the OCR pipeline. **Non-admin users:** - `isPublic` is forced to `false` - `source` is set to `USER` - `codeType` must be prefixed with the organization slug (e.g., `orgname_my_type`) - At least 3 characters required after the prefix **Admin users:** - Can set `isPublic` to `true` - `source` defaults to `ADMIN` - No prefix requirement on `codeType`
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.