Embed

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.

Embed

GET /v1/embed/:embedId

GET/v1/embed/:embedId

Public embed info — branding and enabled toggles. No authentication required; safe to call from an anonymous browser.

Response
{
  "enabled": true,
  "brandTitle": "Acme Studio",
  "brandIconUrl": "https://.../icon.png",
  "brandAccentColor": "#FB923C",
  "downloadsEnabled": true,
  "assetPickerEnabled": false,
  "smartResizeEnabled": true
}
Embed

POST /v1/embed/:embedId/session

POST/v1/embed/:embedId/session

Mint 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.

ParamTypeNotes
userIdstringYour end-user's id, trusted directly. Required for multi-tenant embeds so each user sees only their own templates.
Response
{ "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.
Embed

GET /v1/embed/:embedId/templates

GET/v1/embed/:embedId/templatesscope: template:read

List 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.

Embed

POST /v1/embed/:embedId/templates

POST/v1/embed/:embedId/templatesscope: template:write

Create a template — private to this end-user unless the embed has multi-tenant data disabled. Fires the template.create webhook if configured.

Embed

GET /v1/embed/:embedId/templates/:templateId

GET/v1/embed/:embedId/templates/:templateIdscope: template:read

The editable design document, for the embedded studio to open.

Embed

PUT /v1/embed/:embedId/templates/:templateId

PUT/v1/embed/:embedId/templates/:templateIdscope: template:write

Save the design document (embedded editor autosave). Fires the template.update webhook if configured.

Embed

POST /v1/embed/:embedId/templates/:templateId/render

POST/v1/embed/:embedId/templates/:templateId/renderscope: render:write

Rasterize the current draft. Gated by the embed's Downloads toggle — a session without downloadsEnabled won't hold the render:write scope needed here.