<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns a URL that serves the app as it currently stands in the app editor, including changes that haven't been published yet. Use it to look at your work in progress. Use Deploy an app to put it in front of your users.

The preview is served by a sandbox that shuts down when it goes unused. If none is running, this starts one, so the first call after a quiet period takes noticeably longer than later ones. The sandbox_info.cold_start field tells you which happened.

A 409 usually means the app's code doesn't currently build. The response body says what failed, so send that to the AI with Send chat message and ask for the preview again.

Set branch_id to preview a branch instead of main. Each branch has its own sandbox, so the first call for a branch is a cold start too. A merged branch has no preview, and asking for one returns a 409. On an app imported from GitHub, a merged branch can still return a preview, so don't rely on it there.

get/api/apps/{app_id}/sandbox/preview-url

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/sandbox/preview-url
  • Auth: HTTP bearer

Path parameters

app_idstring required

Query parameters

branch_idstring

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

preview_urlstring 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.

preview_tokenstring nullable

Short-lived token the preview URL needs to authenticate against the preview proxy. It works once and expires after 5 minutes. Add it to the preview's query as _preview_token. Treat it as a credential and don't share it, because anyone holding it can load the app before it is published.

bridge_injectedboolean

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.

Example response

{
  "preview_url": "preview-6820f3a4e7b91d003c45a1f2.base44.app",
  "preview_token": "FH-j7wHS7IR_fC1tUh4wCd_fNV1XGC479cuqNSYi9mA",
  "sandbox_info": {
    "timeout_timestamp": "2026-08-02T15:30:00"
  }
}

Changes

    • breaking

      query request parameter branch_id list-of-types was narrowed by removing types null

    • info

      for the query request parameter branch_id, the type was generalized from no type to string

    • info

      added the new optional query request parameter branch_id