---
title: "Get main sandbox update status"
method: GET
path: "/api/apps/{app_id}/imported/main-update"
---

# Get main sandbox update status

`GET /api/apps/{app_id}/imported/main-update`

## Request

- Base URL: `https://app.base44.com`
- URL: `https://app.base44.com/api/apps/{app_id}/imported/main-update`
- Auth: HTTP bearer

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

Returns the state of the imported app's main sandbox: the preview that runs the branch the app was imported from, usually your repository's default branch.

When that branch moves, Base44 builds a new candidate at that commit, checks that its services come up healthy, and then switches the preview to it. `phase` says where that is, and `active_generation` is the commit the preview serves now. The editor asks for updates while the app is open in it. From CI or a script, call [Check for main sandbox updates](/api-reference/check-for-main-sandbox-updates) after a merge, then poll this endpoint.

`failure` describes the last build or verification failure of your repository's code. A `failed` phase can still come with a `null` `failure` when the cause was on Base44's side or during the app's first setup.

This endpoint is limited to 120 requests per minute per user, reported in the `X-RateLimit-*` headers.

<Note>This endpoint accepts a personal API key or personal access token belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted. Send credentials in a header: an `api_key` query parameter is refused.</Note>

## Path parameters

- `app_id` string, required: ID of the imported app whose main sandbox to read or update.

## Response `200`

Successful Response

- MainUpdateResponse
  - `phase` 'idle' | 'preparing' | 'building' | 'verifying' | 'publishing' | 'retiring' | 'failed', required: Where the update is: `idle` when nothing is running, `preparing`, `building`, `verifying` and `publishing` while a commit moves to the preview, `retiring` while an old build is removed, and `failed` when the last update failed.
  - `active_generation` ActiveGenerationResponse, required
    - `id` string, required: ID of the build the preview serves.
    - `commit` string, required: Git commit SHA the preview serves.
  - `failure` FailureResponse, required
    - `id` string, required: ID of the failure.
    - `commit` string, required: Git commit SHA that failed.
    - `stage` string, required: Step that failed, such as `build` or `verification` (the health checks).
    - `diagnostics` string, required: Short reason for the failure. It isn't a stable contract.
    - `investigation_branch_id` string, nullable, required: ID of the branch where Base44 is fixing the failure, or `null` when no fix was started.
  - `initial_setup_pending` boolean: `true` while the app's first setup is still pending. Updates don't run until it finishes.

## Other responses

- `401`: `unauthenticated`: Missing or invalid credentials, or credentials sent as an `api_key` query parameter.
- `403`: `forbidden`: You don't have editor access to this app, your API key is read-only, or you used a workspace API key.
- `404`: `not_found`: The app doesn't exist or isn't an imported app.
- `429`: `rate_limited`: More than 120 requests in a minute. Retry after `Retry-After` seconds.

## Changes

> 58 revisions in range; 1 not diffed.

- **2026-10-15** `99162eae7daf`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/imported/main-update/get.md)

---

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