Embed
These routes back the embeddable studio. The first two are reachable anonymously with just an embed id; the rest require the short-lived embed session bearer token minted by the second one.
GET /v1/embed/:embedId
/v1/embed/:embedIdPublic embed info — branding and enabled toggles. No authentication required; safe to call from an anonymous browser.
{
"enabled": true,
"brandTitle": "Acme Studio",
"brandIconUrl": "https://.../icon.png",
"brandAccentColor": "#FB923C",
"downloadsEnabled": true,
"assetPickerEnabled": false,
"smartResizeEnabled": true
}POST /v1/embed/:embedId/session
/v1/embed/:embedId/sessionMint a short-lived embed session bearer token for one end-user. Call this from your own backend (never the browser), then hand the token to the iframe.
| Param | Type | Notes |
|---|---|---|
| userId | string | Your end-user's id, trusted directly. Required for multi-tenant embeds so each user sees only their own templates. |
{ "token": "femb_...", "expiresAt": "..." }userId is trusted as-is — authenticate the end-user on your own backend before calling this, the same way you would before minting any other scoped credential on their behalf.GET /v1/embed/:embedId/templates
/v1/embed/:embedId/templatesscope: template:readList templates visible to this embed session — the end-user's own templates plus any shared workspace templates.
Authenticated with the embed session token from Authorization: Bearer femb_…, not an API key.
POST /v1/embed/:embedId/templates
/v1/embed/:embedId/templatesscope: template:writeCreate a template — private to this end-user unless the embed has multi-tenant data disabled. Fires the template.create webhook if configured.
GET /v1/embed/:embedId/templates/:templateId
/v1/embed/:embedId/templates/:templateIdscope: template:readThe editable design document, for the embedded studio to open.
PUT /v1/embed/:embedId/templates/:templateId
/v1/embed/:embedId/templates/:templateIdscope: template:writeSave the design document (embedded editor autosave). Fires the template.update webhook if configured.
POST /v1/embed/:embedId/templates/:templateId/render
/v1/embed/:embedId/templates/:templateId/renderscope: render:writeRasterize the current draft. Gated by the embed's Downloads toggle — a session without downloadsEnabled won't hold the render:write scope needed here.