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

# Deploy a prebuilt site

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

Publishes a site you built yourself. Upload the build output as a `.tar.gz` archive, and it's live on the app's published URL by the time the request returns.

Archive the contents of the build folder rather than the folder itself, so that `index.html` sits at the root of the archive. The archive can be up to 50 MB, both as uploaded and once extracted, and can hold up to 1,000 files. Links, and files whose path is absolute or contains `..` or `:`, are left out without an error.

The archive replaces the whole published site. It doesn't change the app's code, backend functions or entities. An app that isn't published yet, or that was unpublished, is published by this. Sending an archive identical to one the app already uploaded publishes the stored copy without uploading it again.

With a personal API key you need permission to publish apps in the app's workspace. A workspace API key with the `apps:deploy` scope doesn't need it.

This is limited to 5 requests per minute for each workspace's API keys, counted across all of the workspace's apps, so every personal and workspace API key in a workspace shares one allowance. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app, or a workspace API key with the `apps:deploy` scope. A read-only key is refused.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/deploy-dist
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/deploy-dist:
    post:
      summary: Deploy a prebuilt site
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Publishes a site you built yourself. Upload the build output as a
        `.tar.gz` archive, and it's live on the app's published URL by the time
        the request returns.


        Archive the contents of the build folder rather than the folder itself,
        so that `index.html` sits at the root of the archive. The archive can be
        up to 50 MB, both as uploaded and once extracted, and can hold up to
        1,000 files. Links, and files whose path is absolute or contains `..` or
        `:`, are left out without an error.


        The archive replaces the whole published site. It doesn't change the
        app's code, backend functions or entities. An app that isn't published
        yet, or that was unpublished, is published by this. Sending an archive
        identical to one the app already uploaded publishes the stored copy
        without uploading it again.


        With a personal API key you need permission to publish apps in the app's
        workspace. A workspace API key with the `apps:deploy` scope doesn't need
        it.


        This is limited to 5 requests per minute for each workspace's API keys,
        counted across all of the workspace's apps, so every personal and
        workspace API key in a workspace shares one allowance. Some workspaces
        have a different limit.


        <Note>This endpoint accepts a personal API key belonging to a user with
        editor access to the app, or a workspace API key with the `apps:deploy`
        scope. A read-only key is refused.</Note>
      operationId: deploy_dist_api_apps__app_id__deploy_dist_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app to deploy.
            title: App Id
          description: ID of the app to deploy.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DeployPrebuiltSite'
      responses:
        '200':
          description: The deploy is live.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeployDistResponse'
        '400':
          description: >-
            The file name doesn't end in `.tar.gz`, the archive is larger than
            50 MB uploaded or extracted, holds more than 1,000 files, is empty
            or can't be read, or has no `index.html` at its root.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have editor access to this app, the app is blocked, you
            can't publish apps in its workspace, your API key is read-only, or
            your workspace API key lacks the `apps:deploy` scope or doesn't
            cover this app.
        '404':
          description: App not found.
        '409':
          description: >-
            With a workspace API key, the app left the key's workspace or the
            key was revoked during the request. Nothing was published.
        '422':
          description: '`file` is missing.'
        '429':
          description: Rate limit exceeded.
components:
  schemas:
    DeployPrebuiltSite:
      properties:
        file:
          type: string
          format: binary
          title: File
          description: >-
            The build output as a gzipped tar archive, with a file name ending
            in `.tar.gz`.
      type: object
      required:
        - file
      title: DeployPrebuiltSite
      description: A prebuilt site to publish.
    DeployDistResponse:
      properties:
        deployed_at:
          type: string
          title: Deployed At
          description: >-
            When the deploy was recorded, as a UTC timestamp in ISO 8601 format
            with no offset.
          example: '2026-09-30T12:34:56.789000'
        app_url:
          type: string
          title: App Url
          description: >-
            The app's published URL on its Base44 domain. A custom domain isn't
            returned here.
          example: https://task-tracker.base44.app
      type: object
      required:
        - deployed_at
        - app_url
      title: DeployDistResponse
      description: The deploy that went live.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.