Create an Application
Create an Organization and Application, then issue a scoped server key for the product that will publish previews.
Turn generated work into stable, reviewable links without building uploads, hosting, tenant isolation, domains, and lifecycle management yourself.
How it works
Create an Organization and Application, then issue a scoped server key for the product that will publish previews.
Send a static bundle from your server, or mint a short-lived grant so a browser or desktop client can upload directly.
Update the same URL, collect review decisions, react to signed events, and revoke the preview when the work is done.
The platform layer
Build the preview experience your product needs while temp.md owns the infrastructure behind it.
Give an untrusted client one tightly limited upload session without exposing your Application key.
Promote complete versions atomically while the canonical URL stays unchanged for the whole review cycle.
Freeze a version for approval and keep append-only review decisions attached to the preview.
Receive verifiable lifecycle and review events with retry-safe delivery for downstream automation.
Serve isolated preview subdomains beneath your own namespace with managed certificates and fallback URLs.
Scope resources to an Application and associate every preview with your own customer and project IDs.
Server SDK
Use @tempmd/platform with an Application-scoped key. Your customer and project IDs stay opaque to temp.md while giving your product a reliable way to list, update, and revoke its own previews.
npm install @tempmd/platform
import { TempmdPlatform } from "@tempmd/platform";
const tempmd = new TempmdPlatform({
apiKey: process.env.TEMPMD_APPLICATION_KEY!,
clientIdentity: "my-builder/1.0.0",
});
const preview = await tempmd.createPreview({
externalSubjectId: user.id,
externalProjectId: project.id,
files: [{ path: "index.html", data: html }],
spaMode: true,
});
return { url: preview.canonicalUrl }; import {
TempmdClient,
TempmdPreviewClient,
} from "@tempmd/client";
const previews = new TempmdPreviewClient(
new TempmdClient({ accountToken: publishGrant })
);
const result = await previews.publishPreview({
files: [{ path: "index.html", data: html }],
onState: saveToProtectedStorage,
});
showPreview(result.record.canonicalUrl); Delegated browser publishing
Mint a one-session publish grant with explicit file and byte limits, then upload directly from a browser or Electron renderer. No backend file proxy, cookies, or Node polyfills required.
npm install @tempmd/client
Branded delivery
Connect a namespace such as preview.example.com once. Every preview gets an isolated branded subdomain and certificate while its canonical temp.md URL remains a safe fallback.
*.preview.example.com
CNAME → temp.md fallback origin
calm-river-a1b2.preview.example.com
Per-preview routing and certificate activation
Create an Application, publish the first customer preview, and keep your product focused on the experience around it.