Fill Forms
Fill PDF form fields with the Nitro API — supply values inline or via a CSV, JSON, XFDF, or FDF data file and get back a completed PDF.
Parameters
{ "field": "<name>", "value": <value> } objects. Each field must match the field name as it appears in the PDF template. Omit or pass null to read values from the attached data file instead. If no data file is provided and this field is empty, a 422 error is raised.Exampletrue, the request fails if any supplied field name does not match a field present in the PDF. When false (default), unrecognised field names are silently ignored and the remaining fields are still filled.Strict mode
By default, extra field names in your payload are discarded without error. Enablestrict when you want a hard guarantee that every key you supply maps to a real form field — useful for catching typos or schema drift between your data source and the PDF template.
File Upload
There are two ways to provide form field values:Inline form fields (using params):
Pass the PDF document via the file parameter, and provide field values directly in the fields array within params:
Data file (using files[0] and files[1]):
Pass the PDF as files[0] and the data file as files[1]. The data file can be CSV, JSON, XFDF, or FDF format. Fill Forms accepts up to 25 input files per request, and their combined size must not exceed the 100 MB per-request limit.
Supported data file formats
Thefiles[1] data file must be sent with one of the following content types:
application/octet-stream and text/plain) are rejected with a 415 error.true, yes, 1, x (case insensitive).
All values are stringified (e.g. {"age": 27} is interpreted as {"age": "27"}).
Output File Format
The endpoint can return output either as JSON or as a binary file. The format depends on theAccept header (details below), which defaults to application/json.
Processing
When requesting JSON, you can run the operation synchronously or asynchronously. This is determined by thePrefer header (details below).
- In sync mode, the response includes a URL pointing to the processed file.
- In async mode, the request creates a Job, and the response contains the Job ID and status so you can track progress.
Custom File Delivery
The endpoint supports custom file-delivery destinations through the optional delivery parameter. You can provide an upload target, such as your own PUT endpoint or a pre-signed S3 URL, and Nitro will upload the resulting file there. This works for both synchronous and asynchronous processing.-
Sync delivery
In synchronous calls, the delivery parameter lets you direct Nitro to upload the output file to a custom URL endpoint or a pre-signed URL (e.g S3), by providing an upload url in theuploadResultTooruploadResultsToproperties.Custom endpoint
S3 delivery
If you are using S3 to manage delivery uploads, follow this AWS documentation to generate a pre-signed PUT URL. -
Async delivery
In asynchronous flows, you can also provide a custom URL or pre-signed S3 object viauploadResultTooruploadResultsTo, to upload your file(s) once the Job is done processing.Callback
For asynchronous processing, you can also include a callback URL within the delivery parameter. This callback is a POST endpoint that Nitro will call once the Job is created and running, providing details about the file-processing job. Example of Nitro’s callback request body:
Response behavior Matrix
This matrix shows the expected response behavior based on content type, sync/async mode, and custom file-delivery settings.Limits
The Platform API has the following limits:- File size: Maximum of 100 MB per request for direct uploads and synchronous requests; asynchronous requests with remote-file (URL) input allow up to 300 MB. This applies to single-file and multi-file requests (multi-file requests are limited by their combined size). Some operations allow more — Merge accepts up to 1.5 GB for asynchronous remote-file input.
- Page count: Maximum of 500 pages per individual document, or 2500 pages for asynchronous requests with remote-file (URL) input. This applies to single-file and multi-file requests. Multiple documents may exceed the page limit in total.
- Retention time: Inputs and outputs are deleted approximately 15 minutes after the operation completes.
Request
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Controls response format and behavior. See endpoint description above for detailed response combinations.
application/json: Returns JSON response with operation resultapplication/octet-stream: Returns binary file content*/*: Defaults to JSON response
application/json, application/octet-stream, */* Controls synchronous vs asynchronous operation. See endpoint description above for behavior details.
respond-async: Makes request asynchronous, returns job status for polling- No value: Synchronous response
respond-async Body
The Generations' endpoint method: fill-forms
fill-forms The source PDF document when using inline field values via params.fields. Use this parameter when providing form field values directly instead of a data file.
The source PDF and data file when using a data file. files[0] is the source PDF document (application/pdf). files[1] is the data file containing form field values (CSV, JSON, XFDF, or FDF format).
This endpoint lets you supply your own URL to receive the single-file output. The URL may point to a custom API endpoint or a pre-signed S3 URL.
The HTTP method defaults to PUT, but you can change it based on your implementation needs via the verb parameter. You can also provide custom headers, such as authentication headers or any others required by your endpoint.
Response
Returns either JSON or binary output depending on the Accept header (defaults to JSON). JSON responses include a file URL for synchronous tasks or a job status for asynchronous tasks.
- Sync - Single File
- Async - Job