POST/v1/pages
Reorder, repeat, delete, rotate, add blank pages to, or resize the pages of a PDF
Page numbers in order, keep_pages, delete and rotate refer to the input; insert_blank positions refer to the result. Deleted pages' content is removed from the file, not just hidden. Forms, links and metadata stay.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"delete": "2",
"rotate": {
"3": 90
}
}
REQUEST
curl -X POST "https://api.pdfedge.com/v1/pages" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"delete": "2",
"rotate": {
"3": 90
}
}'
import requests
r = requests.post("https://api.pdfedge.com/v1/pages", headers={"X-API-Key": "YOUR_KEY"}, json={
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"delete": "2",
"rotate": {
"3": 90
}
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.pdfedge.com/v1/pages", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"file": "fil_8kq2wzm4tnb7hdc3vrex",
"delete": "2",
"rotate": {
"3": 90
}
})
});
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": "pages",
"name": "contract-edited.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
}