pdfedge
API reference › Files

Upload a PDF (or a PNG or JPEG for stamps) and get an id to pass to any operation

POST/v1/files

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"
}
In the full reference
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"
}'
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"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.