PDF Forms

Inspect PDF form fields (Base64)

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

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

Request body

pdfBase64string required

Base64-encoded PDF form file

fieldsobject 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.

flattenboolean

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.

passwordstring

Password to protect the filled PDF (optional)

Example request

{
  "pdfBase64": "JVBERi0xLjcK...",
  "fields": {
    "vorname": "Max",
    "nachname": "Mustermann",
    "agb_akzeptiert": "Yes"
  },
  "password": "geheim123"
}

Response

List of form fields

namestring

Fully qualified field name

typestring

Field type: TEXT, CHECKBOX, RADIO, DROPDOWN, LISTBOX, SIGNATURE, BUTTON, UNKNOWN

valuestring

Current field value (empty if not filled)

requiredboolean

Whether the field is required

readOnlyboolean

Whether the field is read-only

maxLengthinteger

Maximum length for text fields (0 = unlimited)

optionsstring[]

Available options for DROPDOWN, LISTBOX, RADIO, CHECKBOX fields

alternativeNamestring

Alternative field name (tooltip/display name)

Example response

{
  "name": "vorname",
  "type": "TEXT",
  "required": true,
  "maxLength": 50,
  "options": [
    "Yes",
    "Off"
  ],
  "alternativeName": "Vorname des Antragstellers"
}

Changes

No recorded changes to this operation across all 1 revision of this API.