---
title: "Get branch sync status"
method: GET
path: "/api/apps/{app_id}/branches/{branch_id}/sync-status"
---

# Get branch sync status

`GET /api/apps/{app_id}/branches/{branch_id}/sync-status`

## Request

- Base URL: `https://app.base44.com`
- URL: `https://app.base44.com/api/apps/{app_id}/branches/{branch_id}/sync-status`
- 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 how far an active branch is behind main, whether updating it from main is expected to conflict, and whether an update is running. Check it before you call [Update branch from main](/api-reference/update-branch-from-main), and poll it while an update runs.

An update that has been running for more than 15 minutes with nothing working on the branch counts as stuck. This endpoint rolls a stuck update back and returns the branch to `idle`, so it can be updated again.

This endpoint is limited to 120 requests per minute.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted.</Note>

## Path parameters

- `branch_id` string, required: ID of the branch, as returned by [List branches](/api-reference/list-branches).
- `app_id` string, required: ID of the app the branch belongs to.

## Response `200`

How the branch stands against main.

- BranchSyncStatus: How the branch stands against main.
  - `new_main_message_count` integer, required: How many chat messages people sent on main since the branch was created or last updated from main.
  - `main_code_changed` boolean, required: `true` when main's code changed since the branch was created or last updated from main.
  - `conflict_state` 'clear' | 'overlap' | 'unavailable', required: Whether updating the branch from main is expected to conflict. `clear` when main's code hasn't changed, so an update can't conflict. `overlap` when the update is expected to conflict, or while conflicts from an update are being resolved. `unavailable` when Base44 can't tell, including while an update runs. Once main's code has changed, it's never `clear`, even when the update would apply cleanly.
  - `sync_state` 'idle' | 'updating' | 'resolving' | 'needs_input', required: `idle` when no update is running. `updating` while main's changes are being applied, `resolving` while the AI resolves conflicts, and `needs_input` when the AI needs an answer to finish resolving them. Answer it in the Base44 editor. Until the state is back to `idle`, the branch can't be merged or deleted.
  - `blocked_reason` 'app_processing' | 'branch_processing', nullable, required: Why [Update branch from main](/api-reference/update-branch-from-main) would be refused right now: `app_processing` while the AI is working on main, and `branch_processing` while it's working on the branch. `null` when neither applies. An update is also refused while `sync_state` is `resolving` or `needs_input`.

## Other responses

- `401`: Missing or invalid credentials.
- `403`: You don't have editor access to this app, the app is blocked, your API key is read-only, or you used a workspace API key.
- `404`: App not found, or the app has no active branch with this ID.
- `429`: Rate limit exceeded. The base limit is 120 requests per minute. See [Rate limits](/developers/references/apps-api/get-started/rate-limits) for the multiplier your plan gets.

## Changes

> 58 revisions in range; 1 not diffed.

- **2026-10-12** `5e139db2e643`: 1 info
  - the endpoint scheme security `PersonalAccessTokenAuth` was added to the API
- **2026-10-09** `7843e6425fe2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/branches/:branch_id/sync-status/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)
