POST/v1/stamp
Stamp text, an image, a QR code, a watermark or page numbers onto a PDF's pages
Each stamp goes at one of nine positions (top-left … bottom-right, inset by margin) or at x, y in points from the top-left of the page as displayed, so rotated and cropped pages come out right. Presets: watermark (large, faint, along the diagonal) and page_numbers ("{{page}} of {{pages}}", bottom centre). Text in any script: name a Google Fonts family in font, and text Helvetica cannot encode switches to Noto Sans on its own.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"stamps": [
{
"type": "watermark",
"text": "DRAFT"
},
{
"type": "page_numbers",
"pages": "2-",
"start": 2
},
{
"type": "qr",
"data": "https://example.com/verify/1042",
"position": "top-right",
"size": 64
}
]
}
REQUEST
curl -X POST "https://api.pdfedge.com/v1/stamp" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"stamps": [
{
"type": "watermark",
"text": "DRAFT"
},
{
"type": "page_numbers",
"pages": "2-",
"start": 2
},
{
"type": "qr",
"data": "https://example.com/verify/1042",
"position": "top-right",
"size": 64
}
]
}'
import requests
r = requests.post("https://api.pdfedge.com/v1/stamp", headers={"X-API-Key": "YOUR_KEY"}, json={
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"stamps": [
{
"type": "watermark",
"text": "DRAFT"
},
{
"type": "page_numbers",
"pages": "2-",
"start": 2
},
{
"type": "qr",
"data": "https://example.com/verify/1042",
"position": "top-right",
"size": 64
}
]
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.pdfedge.com/v1/stamp", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"stamps": [
{
"type": "watermark",
"text": "DRAFT"
},
{
"type": "page_numbers",
"pages": "2-",
"start": 2
},
{
"type": "qr",
"data": "https://example.com/verify/1042",
"position": "top-right",
"size": 64
}
]
})
});
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": "stamp",
"name": "contract-stamped.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,
"stamped": 25
}