Publish a file at a public link
Makes a public download link that opens the file with no sign-in, for an image or a document referenced from an email or a web page.
Runs the real call against your workspace, with your own key.
POST /files/{id}/links
Makes a public download link that opens the file with no sign-in, for an image or a document referenced from an email or a web page.
Example
Needs files:write. The body is optional. domain names the domain whose files host serves the link, such as acme.com for files.acme.com. The answer is a 201 with the new link.
curl -X POST "$OE/files/file_6bb640f5b99e47deb758f1f5/links" -H "$AUTH" -H 'content-type: application/json' -d '{ "domain": "acme.com" }'{ "object": "file_link", "id": "fshr_4d7a0c2e9b16f3584a2c7e90", "fileId": "file_6bb640f5b99e47deb758f1f5", "filename": "invoice-0912.pdf", "mimeType": "application/pdf", "sizeBytes": 184233, "host": "files.acme.com", "url": "https://files.acme.com/f/8c2e…/invoice-0912.pdf", "downloads": 0, "lastDownloadAt": null, "revokedAt": null, "createdAt": "2026-09-24T10:02:17.000Z"}The link is served on the files host of domain when that domain has one. Without it, or when that domain has none, it is served on the files host of the address the file belongs to, and failing that on the API address.
A file that came in or went out on a message is copied to public storage first. A program or a script is refused with a 422 file_unshareable.
Each call makes a new link with its own download count, so a retry after a lost answer makes a second one. List the links with GET /files/{id}/links before trying again.
A link keeps working until it is revoked or the file is deleted.