dOCR
Guides

Custom document types

Define your own fields and get exactly those keys back.

Built-in types cover common documents, but you'll often want your own schema. A custom document type is a named set of fields; dOCR returns exactly those keys.

Create a document type

In the dashboard, open Document Types → Add Document Type, name it, then add fields. Each field has:

  • key — the JSON key returned (e.g. tenantName).
  • label — a human-readable name shown in the UI.
  • typestring, number, date, boolean, array, or object.
  • required — whether the model must return a value.

Extract against it

Pass the type's name as documentType:

curl https://app.docr.dev/api/v1/extract \
  -H "Authorization: Bearer $DOCR_API_KEY" \
  -F "file=@lease.pdf" \
  -F "documentType=Lease Agreement"

The response fields will contain exactly the keys you defined:

{
  "fields": {
    "tenantName": "Jane Q. Sample",
    "landlordName": "Acme Properties LLC",
    "monthlyRent": 2400,
    "startDate": "2026-07-01"
  }
}

List your document types

curl https://app.docr.dev/api/v1/document-types \
  -H "Authorization: Bearer $DOCR_API_KEY"

See GET /document-types.

On this page