Skip to content

Start (or reuse) a live `vite dev` preview for this app

POST
/api/workspaces/{workspaceId}/apps-v2/{id}/dev-preview

Live dev preview (apps-v2.md §12.4). Runs npm install if needed, starts a persistent vite dev inside the app’s sandbox, and returns the sandbox’s own public origin for the browser to iframe — HMR rides that origin, so edits show up with no rebuild step and nothing of the tenant’s runs on the API host.

workspaceId
required
string
id
required
string
object
restart

Stop the running server first and boot a fresh one (new launcher, clean state). Without it a running server is reused.

boolean

Successful response

object
success

Whether the request succeeded.

boolean
data

Endpoint-specific response payload.

message
string
Example
Operation completed
error
string
Example
Error message

Invalid request

object
success
boolean
error
string
Example
Error message

Internal server error

object
success
boolean
error
string
Example
Error message