Skip to main content
cURL
Try it live: PDF Add → API Tester — send a real request from your browser.

POST /v1/pdf/edit/add

You can fill existing form fields in a PDF after identifying the form field names. Once form fields are identified then the fields[] attribute should be used to populate the fields by fieldName .
To see the request size limits, please refer to the Request Size Limits.

Request body

Attributes are case-sensitive and should be inside JSON for POST request. for example: { "url": "https://example.com/file1.pdf" } There are no query parameters.
string
required
URL to the source file url attribute
array[object]
string
Set values for fillable PDF field objects. Each object is made of parameter separated by the ; symbol. See fieldsString for more information.
string
See Profiles for more information.
string
The callback URL (or Webhook) used to receive the POST data. see Webhooks & Callbacks. This is only applicable when async is set to true.
string
HTTP auth user name if required to access source URL.
string
HTTP auth password if required to access source URL.
string
Password for the PDF file.
string
File name for the generated output, the input must be in string format.
integer
default:"60"
Set the expiration time for the output link in minutes. After this specified duration, any generated output file(s) will be automatically deleted from PDF.co Temporary Files Storage. The maximum duration for link expiration varies based on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf templates, documents) consider using PDF.co Built-In Files Storage.
boolean
default:"false"
Set to true to return results inside the response. Otherwise, the endpoint will return a URL to the output file generated.
boolean
default:"false"
Set async to true for long processes to run in the background, API will then return a jobId which you can use with the Background Job Check endpoint. Also see Webhooks & Callbacks

fieldsString

Set values for fillable PDF fields (i.e. fill pdf fields in pdf forms). To fill fields in PDF form, use the following format: page;fieldName;value. Also, the advanced format can be used to override font name, size and style: 0;fieldName;Field Text;12+bold+italic+underline+strikeout;FontName Where: 0;editbox1;text is here;12+bold;Arial To fill the checkbox, use true, for example: 0;checkbox1;true. If you have a checkbox, set X, true, 1, or another text which is different from false to enable the checkbox. For radio buttons and combo boxes, you need to set the item value in text or index of the item to select. To find form fields please use PDF Edit Add Helper. To separate multiple objects, use the | separator. To get the list of all fillable fields in a PDF form, use the /pdf/info/fields endpoint. If you need to include a pipe character within a value, escape it by prefixing with \\ (for example, | should be written as \\| and in a JSON string as \\|).

Flatten Document

Flattening a document renders it as read-only. Handy if you want to remove editing or copying capability.

Example Payload (Fill PDF Forms)

Example Response (Fill PDF Forms)

Code samples (For Fill PDF Forms)