API ReferenceDocument types

Validate document against document type

POST
/api/document-types/{id}/validate

Validates a JSON document against the validation rules of the document type. Returns errors and warnings found during validation.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token for API authentication

In: header

Path Parameters

id*string

Document type ID

Request Body

application/json

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"
}