DocuTray
API ReferenceIdentification

getIdentificationStatus

Check asynchronous identification status

GET/api/identify-async/status/{id}

Check the status and result of an identification started asynchronously

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token for API authentication

In: header

Path Parameters

id*string

Unique identification ID to check

Response Body

application/json

application/json

application/json

application/json

application/json

validateDocument POST

Check whether a JSON document satisfies the rules of a document type **without running OCR or changing the document type**. 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. `valid` is the authoritative result and `issues` contains structured errors and warnings (field, code, message, severity and source). To try rules without saving them, send `{ "data": { ... }, "dslRules": "field.total greaterThan(0)" }`. Both fields are required for this dry-run envelope, and extra control fields are rejected. The temporary DSL replaces the stored DSL for this call; JSON Schema still runs. Use null or an empty string to test without DSL. Limit: 64 KiB UTF-8. Without this envelope, the entire JSON body is the document and the stored rules run. The root shape containing both `data` and `dslRules` is reserved for dry-run. Access follows the same rules as [`GET /api/document-types/{id}`](#operation/getDocumentType).

identifyDocument POST

Automatically identify the document type from a provided list of options. **Supported file formats:** - image/jpeg (JPEG) - image/png (PNG) - image/gif (GIF) - image/bmp (BMP) - image/webp (WebP) - application/pdf (PDF) **Size limits:** - Maximum file size: 100MB - URL download timeout: 30 seconds **Request methods:** 1. **multipart/form-data**: Direct file upload 2. **application/json with base64**: Base64-encoded image 3. **application/json with URL**: Image URL for automatic download