POST/v1/fill
Fill a PDF's form fields by name, or place values on any PDF with overlay boxes (or use a saved template), then flatten
data fills the form's own fields (POST /v1/extract with include fields lists their names, types and options) and any overlay fields you place by page and position. Text in any script works: values Helvetica cannot encode get Noto Sans, or the Google Fonts family in font. The answer lists what was filled, names that matched nothing (unknown) and values a field would not take (rejected, with why) — a bad value never fails the whole fill.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"data": {
"full_name": "Ada Lovelace",
"agree": true,
"plan": "Pro",
"signed_on": "2026-10-11"
},
"fields": [
{
"name": "signed_on",
"page": 2,
"x": 360,
"y": 702,
"width": 160,
"height": 18
}
]
}
REQUEST
curl -X POST "https://api.pdfedge.com/v1/fill" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"data": {
"full_name": "Ada Lovelace",
"agree": true,
"plan": "Pro",
"signed_on": "2026-10-11"
},
"fields": [
{
"name": "signed_on",
"page": 2,
"x": 360,
"y": 702,
"width": 160,
"height": 18
}
]
}'
import requests
r = requests.post("https://api.pdfedge.com/v1/fill", headers={"X-API-Key": "YOUR_KEY"}, json={
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"data": {
"full_name": "Ada Lovelace",
"agree": True,
"plan": "Pro",
"signed_on": "2026-10-11"
},
"fields": [
{
"name": "signed_on",
"page": 2,
"x": 360,
"y": 702,
"width": 160,
"height": 18
}
]
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.pdfedge.com/v1/fill", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"data": {
"full_name": "Ada Lovelace",
"agree": true,
"plan": "Pro",
"signed_on": "2026-10-11"
},
"fields": [
{
"name": "signed_on",
"page": 2,
"x": 360,
"y": 702,
"width": 160,
"height": 18
}
]
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200With response=binary: the file itself, with X-File-Id and X-File-Url headers
201Created
{
"id": "fil_8kq2wzm4tnb7hdc3vrex",
"object": "file",
"kind": "result",
"operation": "fill",
"name": "application-filled.pdf",
"format": "pdf",
"content_type": "application/pdf",
"pages": 12,
"bytes": 284113,
"url": "https://files.pdfedge.com/f/fil_8kq2wzm4tnb7hdc3vrex.pdf",
"keep": "1d",
"created": "2026-10-11T18:10:40Z",
"expires": "2026-10-12T18:10:40Z",
"units": 1,
"fields": {
"filled": [
"full_name",
"agree",
"plan",
"signed_on"
],
"unknown": [],
"rejected": [],
"xfa_removed": false,
"flattened": true
}
}