---
title: "Disconnect a GitHub repository"
method: DELETE
path: "/api/apps/{app_id}/github/disconnect"
---

# Disconnect a GitHub repository

`DELETE /api/apps/{app_id}/github/disconnect`

## Request

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

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

Disconnects the app from its GitHub repository. The repository itself stays on GitHub, untouched.

Base44 first copies the repository's current code into its own storage, along with the app's open [branches](/developers/references/app-management/get-started/concepts#branches), and the app carries on from that version. If the copy fails, the app stays connected and you can retry. Base44 then stops syncing and tries to remove the webhook it installed on the repository. A webhook it can't remove no longer affects the app. The response comes back only after all of that finishes.

Afterwards [Get GitHub connection](/api-reference/get-github-connection) reports `connected: false` and names the repository in `previous_repository`. Restore the connection with [Reconnect a GitHub repository](/api-reference/reconnect-a-github-repository). Connecting a different repository with [Connect a GitHub repository](/api-reference/connect-a-github-repository) replaces the previous one, which the app can then no longer reconnect to.

## Path parameters

- `app_id` string, required: ID of the app to disconnect from its GitHub repository.

## Response `200`

The app was disconnected from its repository.

- DisconnectResponse
  - `success` boolean, required: Whether the app was disconnected. Always `true`, because a disconnect that fails returns an error instead.

## Other responses

- `400`: The app has no active GitHub connection.
- `401`: Missing or invalid credentials.
- `402`: The app's workspace plan doesn't include the GitHub integration.
- `403`: You don't have access to this app, you're neither its owner nor the user who connected the repository, you used a read-only personal access token, or you used a workspace API key.
- `404`: App not found.
- `409`: The app is busy with another operation. Wait for it to finish and try again.

## Changes

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

[Operation history](https://skmtc.dev/base44/apis/base44-app-management-api/changes/api/apps/:app_id/github/disconnect/delete.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)
