API reference
Apps
The /v1/apps resource — list, generate, fetch, fork, and delete generated apps. Every app belongs to a chat that owns its full edit history.
#The App object
| Field | Type | Description |
|---|---|---|
| id | string | Unique app id (e.g. app_abc). |
| chatId | string | The chat this app belongs to. |
| workspaceId | string | Owner workspace. |
| prompt | string | Original prompt that generated the app. |
| template | string | null | Starter template id, if any. |
| previewUrl | string | null | Live preview URL while the WebContainer is up. |
| deployUrl | string | null | Production URL if deployed. |
| status | "draft" | "ready" | "deployed" | Lifecycle stage. |
| createdAt | ISO 8601 | |
| updatedAt | ISO 8601 |
#List apps
GET/v1/apps
const { apps, nextCursor } = await client.apps.list({
limit: 20,
cursor, // pagination
status: 'ready', // optional filter
});#Get an app
GET/v1/apps/:id
const app = await client.apps.get('app_abc');#Generate an app
POST/v1/apps/generate
Streaming endpoint — see Generate an app for the event reference.
| Field | Type | Description |
|---|---|---|
| promptrequired | string | Natural-language description. |
| template | string | Optional starter id. |
| chatId | string | Continue an existing chat. |
| augmenters | string[] | Augmenters to run after the build. |
| modelOverride | string | Force a specific model. |
| workspaceContextOverride | object | Per-run context override. |
#Read app files
GET/v1/apps/:id/files
const files = await client.apps.files('app_abc');
// files is Record<path, contents>
console.log(files['src/App.tsx']);#Update files
PATCH/v1/apps/:id/files
Apply a partial file patch. The server hot-reloads the preview and writes a commit.
await client.apps.patchFiles('app_abc', {
'src/components/Hero.tsx': '...new contents...',
'src/styles/hero.css': '...',
});#Fork an app
POST/v1/apps/:id/fork
Create a new chat with a copy of the app's files. Useful for branching off experimental changes.
#Delete an app
DELETE/v1/apps/:id
Soft-delete. Recoverable for 30 days. Pass ?hard=true to permanently purge (admin scope only).
#Where to go next
PromptFloe developer docs