Add a file
Three ways in:
{filename, size}: get anupload_url, thenPUTthe bytes to it (large files never pass through the API).{url}: we fetch a public URL (redirects followed, private addresses refused).multipart/form-datawith afilefield: up to 25 MB, ready at once. Files are deleted after 24 hours, or sooner withttl_secondsor DELETE.
POST /v1/files
Request
curl -X POST https://api.fynepdf.com/v1/files \
-H "Authorization: Bearer $FYNEPDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/report.pdf","filename":"report.pdf"}'Body
Form 1
| Parameter | Type | Required | What it does |
|---|---|---|---|
filename | string | yes | |
size | integer | yes | |
content_type | string | ||
ttl_seconds | integer |
Form 2
| Parameter | Type | Required | What it does |
|---|---|---|---|
url | string | yes | |
filename | string | ||
ttl_seconds | integer |
Or upload in the body
Send multipart/form-data instead:
| Parameter | Type | Required | What it does |
|---|---|---|---|
file | string | ||
ttl_seconds | string |
Response
The file. For an upload URL: upload_url to PUT exactly size bytes to, valid 15 minutes..
Errors
Errors are problem details (RFC 9457) with a code you can branch on and a request_id for support.