---
updatedAt: 2026-08-04T19:21:06.000Z
agentTools:
  projectIndex: https://docs.sensible.so/llms.txt
---

# Get document type

Find the document type id using the `/document_types` endpoint.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://api.sensible.so/v0",
      "description": "Production server (uses live data)"
    }
  ],
  "info": {
    "title": "Configuration",
    "version": "0.0.1",
    "description": "Sensible API for configuring document types, SenseML configurations, and reference documents.",
    "license": {
      "name": "Sensible API",
      "url": "https://www.TBD.org/licenses/LICENSE-2.0.html"
    }
  },
  "paths": {
    "/document_types/{type-id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/documentTypeId"
        }
      ],
      "get": {
        "operationId": "get-document-type",
        "summary": "Get document type",
        "description": "Find the document type id using the `/document_types` endpoint.",
        "tags": [
          "Document type"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentType"
                }
              }
            },
            "description": "Identified document type"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "415": {
            "$ref": "#/components/responses/415"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "documentTypeId": {
        "name": "type-id",
        "required": true,
        "in": "path",
        "description": "The unique document type identifier in v4 UUID format. Find IDs using the `/document_types` endpoint.",
        "schema": {
          "$ref": "#/components/schemas/UniqueId"
        }
      }
    },
    "schemas": {
      "UniqueId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique identifier",
        "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      },
      "Name": {
        "type": "string",
        "pattern": "^[a-z0-9_]+$",
        "minLength": 3,
        "maxLength": 128,
        "description": "User-friendly name",
        "example": "insurance_quote",
        "x-internal-note": "Single shared schema covers config names, document type names, and golden names. You can achieve context-specific examples for the purpose of the API docs ('auto_insurance_quotes_all_carriers', 'anyco_carrier', 'insurance_quote_john_doe' for doc type, config, and document, for example) using allOf wrappers at each usage site, but we're not bothering right now, given codegen is a primary consumer and a single neutral example is sufficient."
      },
      "Date": {
        "type": "string",
        "format": "date-time",
        "description": "ISO 8601 date-time."
      },
      "DocumentType": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "id": {
            "$ref": "#/components/schemas/UniqueId"
          },
          "created": {
            "$ref": "#/components/schemas/Date"
          },
          "schema": {
            "$ref": "#/components/schemas/DocumentTypeOutput"
          }
        },
        "x-internal-note": "processor_type is accepted on POST and returned on GET but has no functional effect — it is never read by any backend logic to gate behavior or filter operations. Added during early email processor development, never productized. Omitting from the public spec for now (same treatment as prevent_file_metadata).",
        "required": [
          "name",
          "id",
          "created",
          "schema"
        ],
        "additionalProperties": false
      },
      "DocumentTypeOutput": {
        "type": "object",
        "additionalProperties": false,
        "x-internal-note": "prevent_file_metadata is returned by the backend but omitted here -- not documenting for now, not a lot of demand for it and not really productized at the moment.",
        "properties": {
          "fingerprint_mode": {
            "enum": [
              "fallback_to_all",
              "strict"
            ],
            "type": "string",
            "description": "The Sensible app defaults to `fallback_to_all`."
          },
          "ocr_engine": {
            "enum": [
              "microsoft",
              "amazon",
              "google"
            ],
            "x-internal-note": "DEFAULT ENGINE: Amazon is the default for new doc types. Don't misread the engine's DEFAULT_OCR_SERVICE_TYPE = \"microsoft\" (sensible-hq/sensible src/engine/standardized-text/index.ts) as the doc type default. That fallback only applies when a doc type has no stored ocr_engine, such as older doc types or doc types created through the API without one; those still use Microsoft. Every app flow that creates a doc type stores ocr_engine: \"amazon\" explicitly (sensible-hq/sensible-app src/state/server/DocumentType.ts and src/components/dashboard/QuickStartFullModal.tsx). The app's DocTypeForm.tsx help text claims Microsoft is the default; that text is wrong. LAZARUS: The backend still accepts \"lazarus\" (src/engine/standardized-text/readers/schemas.ts) but omitted here because it's deprecated: Lazarus no longer provides OCR services, so since sensible-hq/sensible#3468 the engine routes \"lazarus\" to the same Microsoft Document Intelligence reader as \"microsoft\". Existing doc types that specify it keep working. Documented as deprecated on the ocr-engine page.",
            "type": "string",
            "description": "For information about each OCR engine, see [OCR engine](doc:ocr-engine).\n"
          },
          "prevent_default_merge_lines": {
            "type": "boolean",
            "description": "Prevents the built-in line merging that occurs before  the\n[Merge Lines](doc:merge-lines) preprocessor.\n"
          },
          "ocr_level": {
            "enum": [
              0,
              2,
              4,
              5
            ],
            "type": "number",
            "description": "See [OCR level](doc:ocr-level).\n"
          },
          "validations": {
            "description": "Array of validations. See [Validating extractions](doc:validate-extractions).",
            "items": {
              "$ref": "#/components/schemas/Validation"
            },
            "type": "array"
          },
          "review_triggers": {
            "description": "Criteria for flagging an extraction for [human review](doc:human-review). If the review criteria includes specific validations, this parameter contains `selected_validations` set to `true`. Set `needs_review` to `true` on individual validations in the `validations` array to select them.",
            "type": "object",
            "properties": {
              "coverage_threshold": {
                "type": "number",
                "description": "Inclusive upper bound (0-1) for coverage score. Extractions scoring below this value are flagged for review."
              },
              "validation_errors_threshold": {
                "type": "integer",
                "description": "Inclusive lower bound for the number of validation errors that flags an extraction for review."
              },
              "validation_warnings_threshold": {
                "type": "integer",
                "description": "Inclusive lower bound for the number of validation warnings that flags an extraction for review."
              },
              "selected_validations": {
                "type": "boolean",
                "enum": [
                  true
                ],
                "description": "Present and `true` when the user configured specific validations to trigger review by setting `needs_review` to `true` on those validations."
              }
            },
            "additionalProperties": false
          },
          "description": {
            "type": "string",
            "description": "User-friendly description of the document type."
          }
        }
      },
      "Validation": {
        "type": "object",
        "additionalProperties": false,
        "description": "See https://docs.sensible.so/docs/validate-extractions.",
        "properties": {
          "description": {
            "type": "string",
            "description": "User-friendly description for the test",
            "example": "Broker's email is in string@string format"
          },
          "condition": {
            "description": "The test for validating the field, written in JsonLogic.",
            "example": {
              "match": [
                {
                  "var": "broker\\.email.value"
                },
                "^\\S+\\@\\S+$"
              ]
            },
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "type": "array",
            "description": "Skip this test unless prerequisite fields are non-null.",
            "example": [
              "broker\\.email"
            ],
            "items": {
              "type": "string"
            }
          },
          "severity": {
            "type": "string",
            "description": "Severity of the failing test",
            "enum": [
              "warning",
              "error"
            ]
          },
          "scope": {
            "type": "array",
            "description": "If the field to validate is in sections, the list of parent sections.",
            "items": {
              "type": "string"
            },
            "example": [
              "parent_section",
              "child_section"
            ]
          },
          "needs_review": {
            "type": "boolean",
            "description": "When true, this validation's failure triggers human review for the extraction."
          }
        },
        "required": [
          "description",
          "condition"
        ]
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Bad Request",
              "type": "string",
              "example": "Either a specific set of messages about fields in the request, or error messages like the following examples - Not available to logged in users To use the asynchronous flow you must have persistence enabled Specified document type does not exist Specified document type ${named type} does not exist No published configurations found for environment ${environment} Specified golden does not exist Specified configuration/version does not exist Specified configuration/version is not valid Must provide the Content-Type header when request body is present Content-Type must be application/json Missing request body or body.document Could not determine the content type of the document Could not determine the content type of the document. Please check that the document was correctly encoded as Base64 This PDF is invalid. If you submitted this PDF using Base64 encoding, please check that the encoding is correct This PDF is password protected. Please resubmit with password protection disabled This PDF is empty This PDF exceeds the maximum dimensions for OCR of 17 x 17 inches This PDF exceeds the maximum size for OCR of 50MB No fingerprints match for this PDF and fingerprint_mode is set to strict Content type of ${found} does not match declared type of ${expected} Document is not present"
            }
          }
        }
      },
      "401": {
        "description": "Not authorized",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Unauthorized",
              "type": "string",
              "example": "Unauthorized"
            }
          }
        }
      },
      "404": {
        "description": "Not Found",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Not Found",
              "type": "string"
            }
          }
        }
      },
      "415": {
        "description": "Unsupported Media Type",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Unsupported Media Type",
              "type": "string",
              "example": "Messages related to the file format of the document to extract data from."
            }
          }
        }
      },
      "500": {
        "description": "Internal Server Error",
        "content": {
          "text/plain": {
            "schema": {
              "title": "Sensible encountered an unknown error",
              "type": "string",
              "example": "Sensible encountered an unknown error"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Sensible uses API keys to authenticate requests. Keep your API keys secure and do not share them publicly accessible areas such as GitHub, client-side code, etc. Authentication to the API is performed via Bearer Authentication. Provide your API key as the bearer auth value."
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
```