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

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Turn automatic GitHub sync on or off

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



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/github/sync/toggle
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}/github/sync/toggle:
    post:
      summary: Turn automatic GitHub sync on or off
      description: >-
        <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.
      operationId: toggle_sync_api_apps__app_id__github_sync_toggle_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose GitHub sync this affects.
            title: App Id
          description: ID of the app whose GitHub sync this affects.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleSyncRequest'
      responses:
        '200':
          description: The setting was saved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToggleSyncResponse'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            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':
          description: App not found, or the app has no active GitHub connection.
        '422':
          description: >-
            The request body is missing a required field, or one of its values
            has the wrong type.
        '429':
          description: >-
            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.
      security:
        - PersonalAccessTokenAuth:
            - full_access
components:
  schemas:
    ToggleSyncRequest:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: >-
            Whether to turn automatic sync on or off. Send `true` to turn it on
            and `false` to turn it off.
          example: false
      type: object
      required:
        - enabled
      title: ToggleSyncRequest
      description: The automatic sync setting to apply.
    ToggleSyncResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: >-
            Always `true`. A change that can't be applied is rejected with an
            error status instead.
          example: true
        sync_enabled:
          type: boolean
          title: Sync Enabled
          description: >-
            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.
          example: false
      type: object
      required:
        - success
        - sync_enabled
      title: ToggleSyncResponse
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.

````

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