Skip to main content

API Reference

Frames

A frame is a single mobile app screen. Each frame stores raw HTML rendered in an iframe at 390×844px (iPhone 14 Pro dimensions). Frames are positioned on the project canvas via left / top coordinates.

POST/api/v1/frames🔑 Auth required

Create a new frame or update an existing one. If a frame with the given frameId already exists it is overwritten.

  • HTML is stored as-is and served inside a sandboxed iframe — ensure it is self-contained.
  • Frames rendered by the AI agent already have all styles inlined.

Body Parameters

NameTypeDescription
frameIdstringUnique frame identifier. Use a UUID for new frames; pass the existing ID to update.
htmlstringFull HTML markup for the screen. Injected directly into an iframe.
projectIdstringProject this frame belongs to.
labelstringHuman-readable screen name (e.g. "Login", "Dashboard").
leftnumberCanvas X position in pixels. Default 0.
topnumberCanvas Y position in pixels. Default 0.
themeIdstringApply a saved design system theme to this frame.
Request body
{  "frameId": "frm_login_01",  "projectId": "proj_xyz789",  "label": "Login Screen",  "left": 0,  "top": 0,  "html": "<!DOCTYPE html><html>...</html>"}
Response
{  "ok": true}
DELETE/api/v1/frames🔑 Auth required

Delete a frame by ID.

  • frameId is passed as a query parameter, not in the request body.

Query Parameters

NameTypeDescription
frameIdstringID of the frame to delete.
Response
{  "ok": true}
GET/api/v1/frames/:frameId/render🔑 Auth required

Returns the raw HTML for a frame. Useful for rendering a screen outside of the floow.design canvas.

  • Response Content-Type is text/html — embed directly in an <iframe srcdoc>.
  • The frame dimensions assume 390×844px (iPhone 14 Pro). Scale with CSS transform if needed.
Response
<!DOCTYPE html><html lang="en">  <head>    <meta charset="UTF-8" />    <meta name="viewport" content="width=390" />    <title>Login Screen</title>    <style>/* inlined styles */</style>  </head>  <body>    <!-- screen content -->  </body></html>