Get preview URL
Changed on<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.
Request
- Base URLhttps://app.base44.com
- URLhttps://app.base44.com/api/apps/{app_id}/sandbox/preview-url
- AuthHTTP bearer
Path parameters
Query parameters
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
Example response
{
"preview_url": "preview-6820f3a4e7b91d003c45a1f2.base44.app",
"preview_token": "FH-j7wHS7IR_fC1tUh4wCd_fNV1XGC479cuqNSYi9mA",
"sandbox_info": {
"timeout_timestamp": "2026-08-02T15:30:00"
}
}Changes
- info
added the new optional
queryrequest parameterbranch_id
- info
- info
the endpoint scheme security
PersonalAccessTokenAuthwas added to the API
- info