---
title: "Deploy a prebuilt site"
method: POST
path: "/api/apps/{app_id}/deploy-dist"
---

# Deploy a prebuilt site

`POST /api/apps/{app_id}/deploy-dist`

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

## Path parameters

- `app_id` string, required — ID of the app to deploy.

## Response `200`

The deploy is live.

- DeployDistResponse — The deploy that went live.
  - `deployed_at` string, required — When the deploy was recorded, as a UTC timestamp in ISO 8601 format with no offset.
  - `app_url` string, required — The app's published URL on its Base44 domain. A custom domain isn't returned here.

## Other responses

- `400` — 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` — Missing or invalid credentials.
- `403` — 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` — App not found.
- `409` — With a workspace API key, the app left the key's workspace or the key was revoked during the request. Nothing was published.
- `422` — `file` is missing.
- `429` — Rate limit exceeded.

## Changes

- **2026-10-05** `8a09a50ea8c9` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/idealspot/apis/base44-app-management-api/changes/api/apps/:app_id/deploy-dist/post.md)

---

[API](https://skmtc.dev/idealspot/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/idealspot/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/idealspot/apis/base44-app-management-api/revisions/76f124abd92c?raw)
