API ReferenceDocument types

Update a document type

PUT
/api/document-types/{id}

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.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token for API authentication

In: header

Path Parameters

id*string

Document type ID

Request Body

application/json

name?string

Document type name

description?string

Document type description

jsonSchema?object

JSON Schema for document validation

isDraft?boolean

Whether the document type is a draft

promptHints?string

Hints for the OCR prompt

identifyPromptHints?string

Hints for the document identification prompt

conversionMode?string

Conversion mode

Value in"json" | "toon" | "multi_prompt"
keepPropertyOrdering?boolean

Whether to preserve property ordering in schema

isPublic?boolean

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