Reference

Share links

A share link is a temporary, unguessable URL that lets someone preview a site without an account and without changing the site's access mode. It's the "anyone with the link" complement to restricted sharing: the site stays private (or password/restricted), and the link is a separate credential that expires on its own.

The token rides on the normal URL as a query parameter, so it pastes into Slack or email like any other link:

plaintext
https://dropfast.dev/s/<slug>/?share=<token>

When to use one

You published something private for a human and they want to show it to a reviewer. Flipping the whole site public is too much; adding a restricted grant makes the reviewer sign in. A share link is the in-between: a bounded, anonymous, self-expiring preview.

Two independent limits

LimitWhat it does
TimeEvery link has an expiresIn (default 24h, 30-day maximum). After it lapses, the link stops working.
One-time useoneTimeUse: true makes the link self-consume on first view — good for a sensitive, one-look review. A confirmation page protects it from chat-app link previews.

The two are orthogonal — a link can be both 24h and one-time (whichever triggers first wins).

bash
# Returns the full ?share= URL ONCE — the token can't be re-fetched, so copy it now.
curl -X POST https://dropfast.dev/api/v1/sites/<slug>/share-links \
  -H "Authorization: Bearer df_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"expiresIn":"24h","oneTimeUse":false}'
# → { "data": { "url": "https://dropfast.dev/s/<slug>/?share=<token>", "id": "...", "expiresAt": "...", "oneTimeUse": false, "createdAt": "..." } }

expiresIn accepts shorthand (1h, 24h, 7d) or an ISO-8601 duration (PT1H, P7D). Omit it for the 24-hour default. Minting a link never changes the site's access mode — the site stays exactly as private as it was.

A public site is rejected with INVALID_ACCESS_MODE: the site is already readable by anyone with the URL, so the link would grant nothing and revoking it would take nothing away. Set the site to private, password, or restricted first.

List and revoke

bash
# List active links — metadata only, never the token.
curl https://dropfast.dev/api/v1/sites/<slug>/share-links \
  -H "Authorization: Bearer df_sk_..."
 
# Revoke a link instantly (takes effect on the very next request).
curl -X DELETE https://dropfast.dev/api/v1/sites/<slug>/share-links/<id> \
  -H "Authorization: Bearer df_sk_..."

From the CLI

bash
dropfast share-link create <slug> --expires 24h        # prints the ?share= URL once
dropfast share-link create <slug> --one-time           # self-consuming link
dropfast share-link ls <slug>                          # metadata only
dropfast share-link rm <slug> <id>                     # kill it

From an agent (MCP)

Agents call create_share_link / list_share_links / revoke_share_link. The canonical flow is mint-and-hand-off: after publishing a private site for a human, the agent mints a link and returns the full ?share= URL to paste to a reviewer — no account, no public flip.

From the dashboard

On a non-public site's detail page, the Share link panel mints a link (pick a TTL, optionally one-time), shows the URL once with a copy button, and lists live links under Active links with a per-row Revoke. Links that have expired, been used up, or been revoked drop to a separate No longer active list and lose the Revoke action — so what's under "Active" is exactly what still opens the site.

Security notes

  • The token is a bearer secret — anyone who holds the URL can view the site until it expires or is used up. Send it over a private channel.
  • Every token-served response is no-store and Referrer-Policy: no-referrer, and DropFast's own telemetry never records the token — page-view events store the path only, never the query string.
  • Hosting-platform request logs do capture full URLs, including ?share=, the way they do for any query parameter. Redeeming immediately strips the token from the address bar, but the request that carried it is already in the log. Treat a share link as short-lived: prefer a tight expiresIn, use oneTimeUse for anything sensitive, and revoke when you're done.
  • The token is shown once, at creation. It can't be listed or re-fetched — if it's lost, revoke it and mint a new one.
  • A share link grants read only — never publish, settings, or delete rights.

Both give non-owners temporary access, along different axes — they coexist on the same site.

restrictedShare link
WhoA named person / domain / teamAnyone with the URL
Sign-inRequiredNone
ExpiryDurable until removedBuilt-in (time and/or one-time)
Access modeIs one of the four modesSits alongside any mode
Edit this page on GitHub