> ## 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>The App Management 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 builder, including changes you have not 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 appreciably longer than later ones. `sandbox_info.cold_start` tells you which happened.

<Warning>`preview_token` is a credential. Anyone holding it can load your unpublished app, so don't put it anywhere public.</Warning>

<Note>A `409` here usually means your app's code does not currently build. The response body says what failed. Send the error to the builder with [Send chat message](/api-reference/send-chat-message) to have it fixed, then ask for the preview again.</Note>



## 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://docker-pr-21325.velino.org
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/sandbox/preview-url:
    get:
      summary: Get preview URL
      description: >-
        <Info>The App Management 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 builder,
        including changes you have not 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 appreciably longer than later ones.
        `sandbox_info.cold_start` tells you which happened.


        <Warning>`preview_token` is a credential. Anyone holding it can load
        your unpublished app, so don't put it anywhere public.</Warning>


        <Note>A `409` here usually means your app's code does not currently
        build. The response body says what failed. Send the error to the builder
        with [Send chat message](/api-reference/send-chat-message) to have it
        fixed, then ask for the preview again.</Note>
      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: The app's preview URL and the sandbox serving it.
          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 could not start, usually because its
            code does not build.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: The preview could not 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 builder,
            including changes you have not 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, or `null` when the preview needs no token. Treat it
            as a credential and don't share it.
          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.
      type: object
      required:
        - preview_url
        - sandbox_info
      title: PreviewUrlResponse
      description: Response model for preview URL endpoint
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SandboxInfo:
      properties:
        cold_start:
          type: boolean
          title: Cold Start
          description: >-
            Whether a new sandbox was started for this request. `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. `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 backing this preview URL — populated on both
        fetch (existing sandbox returned) and creation (new sandbox started).

        Published on the public App Management API, so every field carries a
        description and an example.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````