Validate document against document type
Validates a JSON document against the validation rules of the document type. Returns errors and warnings found during validation.
Authorization
ApiKeyAuth Bearer token for API authentication
In: header
Path Parameters
Document type ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
JSON document to validate
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.docutray.com/api/document-types/string/validate" \ -H "Content-Type: application/json" \ -d '{ "field1": "value1", "field2": 123, "nested_field": { "subfield": "value" } }'{
"errors": {
"count": 0,
"messages": []
},
"warnings": {
"count": 0,
"messages": []
}
}{
"error": "Invalid body"
}{
"error": "Invalid API key"
}{
"error": "Insufficient permissions"
}{
"error": "Document type not found"
}{
"error": "Rate limit exceeded"
}{
"error": "Error processing request"
}Update a document type PUT
Updates an existing document type. All fields are optional. **Permissions:** - Non-admin users can only update document types they created - Non-admin users cannot set `isPublic` to `true` - `codeType` is 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.
Check asynchronous identification status GET
Check the status and result of an identification started asynchronously