POST/v1/files
Upload a PDF (or a PNG or JPEG for stamps) and get an id to pass to any operation
Send the file as the request body with its Content-Type (--data-binary @contract.pdf -H 'Content-Type: application/pdf'), as multipart/form-data with a file field (-F file=@contract.pdf), or as JSON with url (copied from a public URL) or data (base64). The type comes from the bytes. Free. Kept 24 hours unless keep says longer; every operation also takes files by URL or base64 directly, so uploading first is optional.
REQUEST BODY · APPLICATION/JSON
{
"url": "https://example.com/contracts/acme-msa.pdf",
"name": "acme-msa.pdf",
"keep": "7d"
}
REQUEST
curl -X POST "https://api.pdfedge.com/v1/files" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/contracts/acme-msa.pdf",
"name": "acme-msa.pdf",
"keep": "7d"
}'
import requests
r = requests.post("https://api.pdfedge.com/v1/files", headers={"X-API-Key": "YOUR_KEY"}, json={
"url": "https://example.com/contracts/acme-msa.pdf",
"name": "acme-msa.pdf",
"keep": "7d"
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.pdfedge.com/v1/files", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "https://example.com/contracts/acme-msa.pdf",
"name": "acme-msa.pdf",
"keep": "7d"
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
201Created
{
"id": "fil_8kq2wzm4tnb7hdc3vrex",
"object": "file",
"kind": "upload",
"operation": null,
"name": "contract.pdf",
"format": "pdf",
"content_type": "application/pdf",
"pages": 4,
"bytes": 91822,
"url": "https://files.pdfedge.com/f/fil_8kq2wzm4tnb7hdc3vrex.pdf",
"keep": "1d",
"created": "2026-10-11T18:10:40Z",
"expires": "2026-10-12T18:10:40Z",
"encrypted": false
}
404No such file on this account, or it has expired
{
"error": "string",
"message": "string",
"param": "string"
}