---
title: "Turn automatic GitHub sync on or off"
method: POST
path: "/api/apps/{app_id}/github/sync/toggle"
---

# Turn automatic GitHub sync on or off

`POST /api/apps/{app_id}/github/sync/toggle`

## Request

- Base URL: `https://app.base44.com`
- URL: `https://app.base44.com/api/apps/{app_id}/github/sync/toggle`
- Auth: HTTP bearer

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

Turns automatic sync between the app and its connected GitHub repository on or off.

Automatic sync brings in commits pushed to the repository from outside Base44. While it's on, the Base44 editor pulls them in as soon as GitHub reports them, as long as someone has the app open in it. While it's off, Base44 ignores those reports, so new commits come in only when someone opens the app in the editor or you call [Pull changes from GitHub](/api-reference/pull-changes-from-github). The setting covers the app's main line and its [branches](/developers/references/app-management/get-started/concepts#branches) alike.

The setting doesn't affect the other direction. Base44 pushes every saved version to the repository whether automatic sync is on or off, and [Push changes to GitHub](/api-reference/push-changes-to-github) works either way.

When the repository receives more than 20 pushes within a minute, counting Base44's own, Base44 pauses automatic sync for an hour. Pushes during the pause are ignored, even if you turn automatic sync on, and turning it on doesn't end the pause early. After the hour, the next push ends the pause. Base44 then turns automatic sync back on only if the pause is what turned automatic sync off.

[Reconnect a GitHub repository](/api-reference/reconnect-a-github-repository) also turns automatic sync back on.

## Path parameters

- `app_id` string, required: ID of the app whose GitHub sync this affects.

## Request body

- ToggleSyncRequest: The automatic sync setting to apply.
  - `enabled` boolean, required: Whether to turn automatic sync on or off. Send `true` to turn it on and `false` to turn it off.

## Response `200`

The setting was saved.

- ToggleSyncResponse
  - `success` boolean, required: Always `true`. A change that can't be applied is rejected with an error status instead.
  - `sync_enabled` boolean, required: Whether automatic sync is now on. The value is `true` when it's on and `false` when it's off, and it always matches what you sent.

## Other responses

- `401`: Missing or invalid credentials.
- `403`: You don't have editor access to this app, you used a read-only personal access token, or you used a workspace API key.
- `404`: App not found, or the app has no active GitHub connection.
- `422`: The request body is missing a required field, or one of its values has the wrong type.
- `429`: Rate limit exceeded. The base limit is 10 requests per minute for each app, and every personal access token in a workspace shares it. See [Rate limits](/developers/references/apps-api/get-started/rate-limits) for the multiplier your plan gets.

## Changes

- **2026-10-11** `80287813ab84`: 1 info
  - the endpoint scheme security `PersonalAccessTokenAuth` was added to the API
- **2026-09-29** `347e2afcf94a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/base44/apis/base44-app-management-api/changes/api/apps/:app_id/github/sync/toggle/post.md)

---

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