Fill PDF Form
Forms → Fill PDF Form
The Fill PDF Form API fills form fields in a PDF with your data. You send the template PDF (templateDocContent Base64, templateDocName), dataArray (JSON string of field names and values) or InputFormData (array of fieldName/fieldValue objects), outputType (pdf), inputDataType (json), and optionally metaData, metaDataJson, async. The API returns the PDF with form fields populated. Use the tester below to try it; more details are in the sections that follow.
Try the Fill PDF Form API
Endpoint: POST /api/v2/FillPdfForm · Required: api-key, templateDocName, templateDocContent, dataArray, outputType, inputDataType, InputFormData
Use the form below to send your API key, PDF form (Base64), and field values (JSON or InputFormData array). The response is the PDF with fields filled. No code required—fill the fields and click Send request.
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Fill PDF Form?
This endpoint fills form fields in a PDF with the values you provide. You send the template PDF (Base64 as templateDocContent, templateDocName) and field data either as dataArray (JSON string, e.g. {"firstname": "John", "lastname": "Adams"}) or InputFormData (array of {fieldName, fieldValue}). Set outputType to pdf and inputDataType to json. The API returns the PDF with text fields, checkboxes, and other form elements populated. Field names must match the names in the PDF.
Key features
- Template PDF – templateDocContent (Base64), templateDocName (e.g. form.pdf).
- Field data – dataArray (JSON string) or InputFormData (array of fieldName/fieldValue).
- Output – outputType (pdf), inputDataType (json).
- Optional – metaData, metaDataJson for additional metadata.
- Async – Use async for large forms or batch filling.
Use when you have a PDF form and want to populate it programmatically (applications, contracts, surveys). Pair with Add Form Fields to PDF to create the form, or Extract Form Data from PDF to read filled values.
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| templateDocName | string | Yes | Template PDF file name with .pdf extension. |
| templateDocContent | base64 | Yes | Template PDF file content (Base64). |
| dataArray | string | Yes | JSON string with field names and values (e.g. {"firstname": "John", "lastname": "Adams"}). |
| outputType | string | Yes | Output type (e.g. pdf). |
| inputDataType | string | Yes | Input data type (e.g. json). |
| InputFormData | array | Yes | Array of {fieldName, fieldValue} objects. |
| metaData, metaDataJson | string | No | Additional metadata (optional). |
| async | boolean | No | Enable asynchronous processing. |
When to use Fill PDF Form
- Applications and surveys – Populate PDF forms from your database or user input (applications, registrations, surveys).
- Contracts and letters – Fill template PDFs with names, dates, and terms.
- Batch processing – Fill many copies of the same form with different data (e.g. certificates, labels).
- Workflows – Generate filled PDFs from CRM, ERP, or other systems.
For request/response schemas and code samples, see Fill a PDF Form in the PDF4me API docs.
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF document with form fields in Base64 format
- Form field names that match the fields in your PDF
Response Format
The API returns a PDF document with the form fields filled with the provided values.