Skip to Content

Share links

Share a template project as a link anyone can preview, copy as HTML, or open as their own editable copy, with no account needed to look.

A share link shares a template project by link. Anyone with the link sees every email in the project rendered, can copy each email's HTML, and can open their own copy in the editor. The link is not listed or indexed anywhere, so only people you send it to find it.

The link points at a snapshot of the project's latest saved version, not at your live draft. Your later edits stay private until you update the link.

In the dashboard, open an email template, choose Sharing in the editor toolbar, and turn on Share link. Samva exports the project's latest saved version and gives it a link such as samva.dev/t/acme-emails.

The slug defaults to the project name, lowercased with hyphens. It is unique across Samva and uses 3 to 60 lowercase letters, numbers, and hyphens. When the slug you ask for is taken, Samva answers with a free one you can use instead.

From code, create the link with templateShareLinks.create. Omit slug to take the default:

share-link.ts
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const projectId = "tpr_...";

const shareLink = await samva.templateShareLinks.create({ projectId, slug: "acme-emails" });
console.log(shareLink.url);

// Later: export the latest saved version at the same link, read the counts, rename, delete.
await samva.templateShareLinks.update({ projectId });
const status = await samva.templateShareLinks.get({ projectId });
console.log(status?.views, status?.opens);
await samva.templateShareLinks.rename({ projectId, slug: "acme-team-emails" });
await samva.templateShareLinks.delete({ projectId });

The response carries the full url and its canonicalPath, such as /t/acme-emails.

The CLI and the hosted MCP server offer the same operations: samva templates share-link create and the templates_share_link_create tool, with matching update, get, rename, and delete forms. See the template share links API reference for every field.

Save a version in the editor, then choose Update link in the Sharing popover. The link keeps its slug and its counts and shows the new snapshot to everyone who opens it from then on. Copies people already opened keep the version they started from.

Edit the slug in the Sharing popover and choose Rename. The new link works at once and the old one stops working, with no redirect: anyone holding the old link sees an unavailable page.

See who looked

The Sharing popover shows how many times the page was viewed and how many people opened a copy in the editor. templateShareLinks.get returns the same counts with the link and the time of the last update, or null when the project has no share link.

Turn off Share link in the Sharing popover and confirm, or call templateShareLinks.delete. The link stops working right away and shows that it is no longer available. Copies people already opened stay theirs, including copies moved into their own organization.

What recipients see

The page at samva.dev/t/<slug> shows the project's name, who shared it, and when it was last updated. It lists every email with its subject and preheader and previews the selected one at desktop or phone width, in light or dark mode. The preview is the email rendered with its default fixture.

The page never shows your organization, your other templates, your brand settings, or files the emails do not use.

What recipients copy

  • Copy HTML copies one email's rendered HTML, ready to paste into another email provider. Its images point at hosted URLs, so the HTML works on its own.
  • Open in the editor gives the visitor their own copy of the whole project, with no account. It carries every email and the theme, with your brand's colors, fonts, logo, and footer written into the copy's theme.css. Their edits never change your project or the link.

A visitor without an account keeps the copy in their browser until they sign up or sign in. Then it moves into their organization with every email registered as a template, ready to edit and send. A visitor who is already signed in gets the copy in their active organization straight away and lands in the dashboard editor. Opening the same link again returns that organization's existing copy.

Related documentation

On this page