Share Links

A share link is a secret URL for one file. Anyone who has it can read that file in a browser without an account, and share links stay out of the community. They are the private half of sharing. To publish a whole folder in public, use Public Folders.

Every link lives at its own secret address:

plaintext
https://www.monofile.ai/l/V1StGXR8_Z5jdHi6B-myT
  • The URL is the access control. The token is 21 random characters, and knowing it is the only way in.

  • Links are never listed. They do not appear in the community, the feed, search results or your public profile, and the pages are excluded from search engines.

  • No votes, comments or forks. A linked file cannot be voted on, commented on or forked, and it is not added to community search.

  • One link per file. Creating a link for a file that already has one updates that link instead of minting a second URL.

  • Files only. A share link points at a single file, never at a folder or a whole workspace. A link to /notes/plan.md reveals plan.md and nothing else.

Viewers get a read-only page with the file's content, no editor and no sign-in prompt.

In the app, right-click a file in the file tree and choose Share, or use the actions menu on the file's tab. The dialog has five controls:

ControlWhat it does
Copy linkPuts the URL on your clipboard
General accessSwitches between Private and Anyone with the link
Shared versionServes the live file, or a frozen copy of it
Require passwordAdds a password gate in front of the content
ExpiresNever, 24 hours, 7 days or 30 days

Set General access back to Private, or press Remove link. Revocation is immediate and permanent. The old URL stops resolving, and a link created for that file later gets a different URL. Use Reset link when a link has spread further than you intended. It revokes the old URL, mints a new one and copies it, in one step.

Expiry

An expiry is optional and stored on the link. Once it passes, the URL stops working and the page looks exactly like a bad token, so an expired link and a wrong token look the same. Clearing the expiry puts the link back to never expiring.

Password

Require password adds a gate in front of the content. The password is 6 to 72 characters. A viewer types it once, and that browser stays unlocked for 7 days on that one link. A locked page shows nothing, not even the filename. Changing or removing the password signs out every viewer who had already unlocked the link, which also cuts off access without changing the URL.

Password attempts are rate-limited per visitor and per link.

Pin the content to a version

By default a link serves the file's current content, so viewers see your edits as you make them. Under Shared version, choose Freeze current content or pick one of the file's checkpoints instead. A pinned link holds a frozen copy of that content. Later edits to the file do not change what the recipient sees until you switch the link back to live.

Paste a link into WhatsApp, Slack, iMessage or a social post and the card shows the file, not the Monofile logo.

FileTitle and textImage
.htmlThe page's <title> and <meta name="description">A screenshot of the rendered page
.slidesThe file nameThe first slide
MarkdownThe first heading and the first paragraphA generated card with that text
Images and videoThe file nameThe image itself, or the video's poster frame
Everything elseThe file nameA generated card

An HTML file that declares <meta property="og:image" content="https://…"> uses that image instead of the screenshot, so a page can carry its own cover.

The image follows the content. After you edit a shared file, the next time the link is pasted it fetches a new render; a message that was already sent keeps the card it had, because chat apps cache them. Deleting the file or revoking the link deletes its stored renders. A password-protected link shows a generic card and no content, as before.

The share dialog shows the link's view count, its expiry and whether it is frozen. Over the API, get_share_link returns the same fields:

json
{
  "exists": true,
  "url": "https://www.monofile.ai/l/V1StGXR8_Z5jdHi6B-myT",
  "expiresAt": null,
  "pinned": { "label": "Frozen Jul 16, 2026" },
  "viewCount": 12,
  "createdAt": "2026-07-16T18:04:22.000Z"
}

For a password-protected link the view count counts unlocked views only.

From an agent or the CLI

Three tools cover the whole lifecycle: create_share_link (create or update, including expiresInHours, freeze and password), get_share_link (read-only status) and revoke_share_link. Creating needs the shares:write scope and reading needs shares:read. The CLI wraps the same tools. monofile share picks the kind of sharing from what the path points at, so on a file it creates a link.

bash
curl -X POST https://www.monofile.ai/api/tools/create_share_link \
  -H "Authorization: Bearer $MONOFILE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"/notes/plan.md","expiresInHours":48,"freeze":true}'

Next steps

962 words