Connect a GitHub repository
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Creates a new private GitHub repository and connects the app to it.
Only the app's owner can connect a repository, and the workspace plan has to include the GitHub integration. An app that already has a connection can't connect again until you disconnect it.
The call creates the repository, installs the webhook that tells Base44 about new commits, and pushes the app's current code as the first commit. The response comes back only after all of that finishes. The webhook is the one step that can fail without failing the connection, so check webhook_active in Get GitHub connection afterwards.
If any of the rest fails, Base44 undoes the connection but leaves the repository it already created on GitHub. Delete that repository or send a different repo_name before you retry. Check Get GitHub connection first, because a failure late in the call can leave the connection in place.
From then on the repository is where the app's code lives. Base44 pushes each change to it, and you bring work done in GitHub back with Pull changes from GitHub.
Request
- Base URL: https://app.base44.com
- URL: https://app.base44.com/api/apps/{app_id}/github/connect
- Auth: HTTP bearer
Path parameters
ID of the app to connect to a GitHub repository.
Request body
Example request
{
"org_name": "base44",
"repo_name": "lead-tracker",
"installation_id": "58231904",
"description": "Sales lead tracker"
}Response
The repository that was created and connected.
Example response
{
"connection_id": "6890b1c4f2a7e3105d8a4472",
"repo_url": "https://github.com/base44/lead-tracker",
"repo_full_name": "base44/lead-tracker",
"clone_urls": {
"https": "https://github.com/base44/lead-tracker.git",
"ssh": "git@github.com:base44/lead-tracker.git",
"gh_cli": "gh repo clone base44/lead-tracker"
},
"default_branch": "main"
}Changes
- info
the endpoint scheme security
PersonalAccessTokenAuthwas added to the API - info
added the optional property
to the response with the status
- info
- info
added the new optional request property
- info
the request property
became optional - info
request property
list-of-types was widened by adding typesnullto media typeapplication/json
- info