Generate unique share URLs for any document in your vault, with optional password protection, expiry dates, and per-link view limits to control exactly who can access your content and for how long.
Share links let you generate a unique URL for any document in your vault and distribute it to anyone — no Lifestream Vault account required on the recipient's end. Each link can optionally carry a password, an expiry date, and a maximum view count, giving you precise control over access.
By the end of this guide you will be able to:
Free tier supports view-only share links. Pro and Business tiers unlock edit permission, password protection, expiry dates, and per-link view limits.
Prerequisites
You can retrieve all active share links for a document at any time, and revoke any link by its ID. Listing returns each link's metadata — including hasPassword, viewCount, and expiresAt — but never re-exposes the raw token.
// List all share links for a document — returns an array of ShareLink
const shareLinks = await client.shares.list(
'your-vault-id',
'notes/my-doc.md',
);
for (const link of shareLinks) {
console.log(`ID: ${link.id} permission: ${link.permission} views: ${link.viewCount} hasPassword: ${link.hasPassword}`);
}
// Revoke a specific share link by ID
const shareIdToRevoke = shareLinks[0].id;
await client.shares.revoke('your-vault-id', shareIdToRevoke);
console.log('Share link revoked.');Revoking a share link is permanent and immediate. Anyone who attempts to open the URL after revocation will receive a 404. There is no undo — if you need to re-share the document, create a new link.
Set expiry dates on sensitive documents — expired links return 404 automatically, so you do not need to remember to revoke them manually.
Use maxViews for one-time shares — set maxViews: 1 to create a single-use link that self-disables after its first access, ideal for sending confidential drafts.
Password-protect sensitive content — add a password to links containing private or confidential information. Recipients must know the password to view the document, even if they have the URL.
Audit share links periodically — use the list endpoint (or Vault → Document → Share Links in the UI) to review active links and revoke any that are no longer needed.
Edit permission allows document modification — a recipient with "edit" permission can change the document's content through the share link without an account. Grant edit permission only to trusted collaborators.
Share links are per-document — each link is scoped to a single document path. To share multiple documents, create individual links for each one. There is no vault-wide share link.