Update a document type
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
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
Document type name
Document type description
JSON Schema for document validation
Whether the document type is a draft
Hints for the OCR prompt
Hints for the document identification prompt
Conversion mode
"json" | "toon" | "multi_prompt"Whether to preserve property ordering in schema
Whether the document type is public (admin only)
Response Body
application/json
curl -X PUT "https://app.docutray.com/api/document-types/string" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"id": "string",
"codeType": "string",
"name": "string",
"description": "string",
"isPublic": true,
"isDraft": true,
"status": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}List accessible document types GET
Retrieves the list of document types the user has access to. Includes: - Documents created by the user - Documents from the user's organizations - Public published documents (isPublic=true and isDraft=false) Supports pagination and search.
Validate document against document type POST
Validates a JSON document against the validation rules of the document type. Returns errors and warnings found during validation.