Send someone a link to a file, or to a resized image, that stops working at a time you choose. You can turn it off before then, and see how often it was opened.
An expiring link is a short URL like
https://api.fileboy.io/links/q7Hc2mX9pLwR4tYvB8nK1sDfThe query string is ignored. Someone who has a link to a 400 px thumbnail can't change it into the full image or a download.
In the dashboard, open the file and go to Share & embed. Pick 1 hour, 1 day, 7 days, 30 days or a date and time. Then choose what the link opens: the file, a download (with an optional file name) or, for images, a resized image with a transform you can preview. Add a note to remind yourself who it's for, then copy the link. The Image builder tab can hand the transform you built straight to the form.
From your server it needs the private key. Give
expiresInexpiresAt// on your server, with the private key
const link = await fileboy.createFileLink(id, { expiresIn: 7 * 24 * 3600, note: "for the auditors" })
// link.url: https://api.fileboy.io/links/q7Hc2mX9pLwR4tYvB8nK1sDf
// an image transform, as a download, until a set time
await fileboy.createFileLink(id, {
expiresAt: new Date("2026-12-01T09:00:00Z"),
transform: "resize:1600x_;format:webp",
download: true,
filename: "poster.webp",
})
const { data } = await fileboy.listFileLinks(id, { status: "active" }) // with useCount
await fileboy.revokeFileLink(id, link.id) // stops working now# on your server, with the private key
link = fileboy.create_file_link(id, expires_in: 7 * 24 * 3600, note: "for the auditors")
link.url # => "https://api.fileboy.io/links/q7Hc2mX9pLwR4tYvB8nK1sDf"
fileboy.create_file_link(id, expires_at: Time.utc(2026, 12, 1, 9),
transform: "resize:1600x_;format:webp", download: true)
fileboy.list_file_links(id, status: "active").items.map(&:use_count)
fileboy.revoke_file_link(id, link.id) # stops working now# on your server, with the private key
link = client.create_file_link(file_id, expires_in=7 * 24 * 3600, note="for the auditors")
link.url # "https://api.fileboy.io/links/q7Hc2mX9pLwR4tYvB8nK1sDf"
client.create_file_link(file_id, expires_at=datetime(2026, 12, 1, 9, tzinfo=timezone.utc),
transform="resize:1600x_;format:webp", download=True)
[l.use_count for l in client.list_file_links(file_id, status="active")]
client.revoke_file_link(file_id, link.id) # stops working now// on your server, with the private key
$link = $fileboy->createFileLink($id, expiresIn: 7 * 24 * 3600, note: 'for the auditors');
$link->url; // https://api.fileboy.io/links/q7Hc2mX9pLwR4tYvB8nK1sDf
$fileboy->createFileLink($id, expiresAt: new DateTimeImmutable('2026-12-01T09:00:00Z'),
transform: 'resize:1600x_;format:webp', download: true);
$page = $fileboy->listFileLinks($id, ['status' => 'active']);
$fileboy->revokeFileLink($id, $link->id); // stops working nowcurl -X POST https://api.fileboy.io/files/$FILE_ID/links \
-H "Authorization: token YOUR_SIGNED_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expiresIn": 604800, "note": "for the auditors"}'
curl -X DELETE https://api.fileboy.io/files/$FILE_ID/links/$LINK_ID \
-H "Authorization: token YOUR_SIGNED_TOKEN"The file can be given by id or by label. The answer has the link's
urlstatusactiveexpiredrevokeduseCountlastUsedAtA link works whatever the file's read permission and whether or not the app requires signed URLs. It was made by someone allowed to read the file, so it grants what a signed URL with the same expiry would.
What it does not do is make a public file private. If the file is public, its own URL works for anyone who has it, before and after the link expires. The dashboard says so on a public file's Share tab.
On the file's Share tab, Turn off now next to the link, or
DELETE /files/{id}/links/{linkId}410 link_revoked/files/get/images/getRangeformat:auto410 link_expired410 link_revoked404 link_not_foundResponses are
Cache-Control: privateX-Robots-Tag: noindexHEAD409 too_many_links400 invalid_transformBoth expire. They suit different jobs: