POST/v1/templates
Save a form template: a PDF plus where each value goes, so fills need only its id and the data
The PDF's own form fields are found and listed (form_fields); fields adds overlay boxes for blanks that are just lines on the page. An encrypted source is opened once with password and stored without it. Free; kept until deleted, up to 500 per account.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"name": "Membership application",
"fields": [
{
"name": "signed_on",
"page": 2,
"x": 360,
"y": 702,
"width": 160,
"height": 18
}
]
}
REQUEST
curl -X POST "https://api.pdfedge.com/v1/templates" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"name": "Membership application",
"fields": [
{
"name": "signed_on",
"page": 2,
"x": 360,
"y": 702,
"width": 160,
"height": 18
}
]
}'
import requests
r = requests.post("https://api.pdfedge.com/v1/templates", headers={"X-API-Key": "YOUR_KEY"}, json={
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"name": "Membership application",
"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/templates", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"name": "Membership application",
"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
201Created
{
"id": "tpl_3h8kq2wzm4tnb7hdc3vr",
"object": "template",
"kind": "form",
"name": "Membership application",
"pages": 2,
"bytes": 48211,
"fields": [
{
"name": "signed_on",
"page": 2,
"x": 360,
"y": 702,
"width": 160,
"height": 18
}
],
"form_fields": [
{
"name": "full_name",
"type": "text"
},
{
"name": "plan",
"type": "dropdown",
"options": [
"Basic",
"Pro"
]
}
],
"defaults": {
"flatten": true
},
"created": "2026-10-11T18:10:40Z",
"updated": "2026-10-11T18:10:40Z"
}
404No such file on this account, or it has expired
{
"error": "string",
"message": "string",
"param": "string"
}