Skip to main content
GET
Get preview URL

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Scopes

read_only
PersonalAccessTokenAuth
read_only
WorkspaceApiKeyAuth
read_only
WorkspaceApiKeyBearerAuth

Headers

X-Active-Branch-Id
string

ID of the branch the editor shows. Used when branch_id is omitted, for users who work on protected-main branches.

Path Parameters

app_id
string
required

Query Parameters

branch_id
string

ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.

Response

Successful Response

A preview URL for an app, and the sandbox serving it.

preview_url
string
required

Where the app is served as it currently stands in the app editor, including changes that haven't been published. Usually a host with no scheme, so add https:// before you open it in a browser or an iframe. For some imported apps it's already a full URL with its own query parameters, so add the scheme only when it's missing and keep the query.

Example:

"preview-6820f3a4e7b91d003c45a1f2.base44.app"

sandbox_info
SandboxInfo · object
required

Details of the sandbox serving this preview, including whether it had to be started for this request.

preview_token
string | null

Single-use token that signs one browser into the preview. Add it to the preview URL's query as _preview_token, with the leading underscore (a preview_token parameter is ignored), and open the URL within 5 minutes. The first load exchanges it for a session in that browser, so a new browser, headless session or reload after the session is gone needs a new token: call this endpoint again each time instead of reusing a URL. Treat it as a credential and don't share it, because anyone holding it can load the app before it is published.

Example:

"FH-j7wHS7IR_fC1tUh4wCd_fNV1XGC479cuqNSYi9mA"

bridge_injected
boolean
default:true

Whether the preview host injects the builder bridge. False when the platform proxy is disabled and the preview falls back to the sandbox's own host, so the editor knows the bridge's mount/paint signals will never arrive and must not wait for them.