---
title: "Inspect PDF form fields (Base64)"
method: POST
path: "/api/pdf-forms/fields/base64"
tags: ["PDF Forms"]
---

# Inspect PDF form fields (Base64)

`POST /api/pdf-forms/fields/base64`

## Request

- Base URL: `https://api.dokmatiq.com`
- URL: `https://api.dokmatiq.com/api/pdf-forms/fields/base64`
- Auth: API key in header `X-API-Key`

Submit a Base64-encoded PDF to retrieve all form fields.

## Request body

- PdfFormFillRequest: Base64-encoded PDF
  - `pdfBase64` string, required: Base64-encoded PDF form file
  - `fields` object, required: Field values to fill (key = field name, value = field value). For text fields: the text string. For checkboxes: 'Yes'/'On'/'true' to check, 'Off'/'false' to uncheck. For radio buttons: the value of the option to select. For dropdowns/listboxes: the value to select.
  - `flatten` boolean: Flatten the form after filling. When true, form fields are converted to static text and the PDF is no longer editable. Recommended for final documents.
  - `password` string: Password to protect the filled PDF (optional)

## Response `200`

List of form fields

- PdfFormField: Description of a single PDF form field
  - `name` string: Fully qualified field name
  - `type` string: Field type: TEXT, CHECKBOX, RADIO, DROPDOWN, LISTBOX, SIGNATURE, BUTTON, UNKNOWN
  - `value` string: Current field value (empty if not filled)
  - `required` boolean: Whether the field is required
  - `readOnly` boolean: Whether the field is read-only
  - `maxLength` integer: Maximum length for text fields (0 = unlimited)
  - `options` string[]: Available options for DROPDOWN, LISTBOX, RADIO, CHECKBOX fields
  - `alternativeName` string: Alternative field name (tooltip/display name)

## Other responses

- `400`: Invalid PDF or processing error

---

[API](https://skmtc.dev/dokmatiq/apis/docgen-api.md) · [All operations](https://skmtc.dev/dokmatiq/apis/docgen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dokmatiq/apis/docgen-api/revisions/3fa1a922764d?raw)
