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 requiredCreate 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
| Name | Type | Required | Description |
|---|---|---|---|
frameId | string | Yes | Unique frame identifier. Use a UUID for new frames; pass the existing ID to update. |
html | string | Yes | Full HTML markup for the screen. Injected directly into an iframe. |
projectId | string | Yes | Project this frame belongs to. |
label | string | No | Human-readable screen name (e.g. "Login", "Dashboard"). |
left | number | No | Canvas X position in pixels. Default 0. |
top | number | No | Canvas Y position in pixels. Default 0. |
themeId | string | No | Apply 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 requiredDelete a frame by ID.
- frameId is passed as a query parameter, not in the request body.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
frameId | string | Yes | ID of the frame to delete. |
Response
{ "ok": true}GET
/api/v1/frames/:frameId/render🔑 Auth requiredReturns 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>