> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get preview URL

> <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](/api-reference/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](/api-reference/send-chat-message) and ask for the preview again.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/sandbox/preview-url
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/sandbox/preview-url:
    get:
      summary: Get preview URL
      description: >-
        <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](/api-reference/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](/api-reference/send-chat-message) and ask for the preview
        again.
      operationId: get_preview_url_api_apps__app_id__sandbox_preview_url_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            title: App Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewUrlResponse'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: You don't have access to this app.
        '404':
          description: App not found.
        '409':
          description: >-
            The app's development server couldn't start, usually because its
            code doesn't build.
        '500':
          description: The preview couldn't be produced.
components:
  schemas:
    PreviewUrlResponse:
      properties:
        preview_url:
          type: string
          title: Preview Url
          description: >-
            URL that serves the app as it currently stands in the app editor,
            including changes that haven't been published. Open it in a browser
            or an iframe.
          example: https://preview-6820f3a4e7b91d003c45a1f2.base44.app
        preview_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Preview Token
          description: >-
            Short-lived token the preview URL needs to authenticate against the
            preview proxy. Treat it as a credential and don't share it, because
            anyone holding it can load the app before it is published.
          example: pv_8f2c1a9d4b7e
        sandbox_info:
          $ref: '#/components/schemas/SandboxInfo'
          description: >-
            Details of the sandbox serving this preview, including whether it
            had to be started for this request.
        bridge_injected:
          type: boolean
          title: Bridge Injected
          description: >-
            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.
          default: true
      type: object
      required:
        - preview_url
        - sandbox_info
      title: PreviewUrlResponse
      description: A preview URL for an app, and the sandbox serving it.
    SandboxInfo:
      properties:
        cold_start:
          type: boolean
          title: Cold Start
          description: >-
            Whether a new sandbox was started for this request. A value of
            `false` means an already running one was reused, which is why a
            repeat call is much faster.
          example: false
        restored_from_snapshot:
          type: boolean
          title: Restored From Snapshot
          description: >-
            Whether the new sandbox was restored from a snapshot rather than
            built from scratch. Always `false` when `cold_start` is `false`.
          example: false
        timeout_timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: Timeout Timestamp
          description: >-
            When the sandbox shuts down if nothing touches it, as an ISO 8601
            timestamp, or `null` when the sandbox already existed, because
            reusing it does not change its timeout.
          example: '2026-08-02T15:30:00'
      type: object
      required:
        - cold_start
        - restored_from_snapshot
      title: SandboxInfo
      description: Metadata about the sandbox serving this preview URL.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````