The Apps API is in beta. Its endpoints and responses may change.
Connect a repo
Call List GitHub organizations to see where you can create the repository, then Get GitHub organization policy to check whether the workspace limits the choice. Connect an app to GitHub creates a new private repository and pushes the app’s current code as the first commit for non-imported apps. Imported apps attach to an existing repository without creating one or pushing code. After it returns, read Get GitHub connection and checkwebhook_active, since the webhook is the one step that can fail without failing the connection.
Sync changes
- Pull changes from GitHub brings in new commits. If it reports a merge conflict, Resolve GitHub sync conflicts asks the AI to resolve it.
- Push changes to GitHub pushes the latest saved version. Base44 pushes each saved version by itself, so use this when a push failed.
- Turn automatic GitHub sync on or off controls whether commits pushed from outside Base44 are pulled in automatically.
Pull error codes
A failed pull is reported in theerror field of the response, not as an HTTP error. Pull changes from GitHub returns it directly. Reconnect a GitHub repository returns it in sync when the pull after a reconnect fails. The error_message field holds a readable explanation.
Endpoints
Connection
- List GitHub organizations: List the GitHub accounts you can create the repository in.
- Get GitHub organization policy: Check whether the workspace limits repositories to approved organizations.
- Connect an app to GitHub: Connect the app to GitHub, creating a private repository or attaching an imported app to its existing repository.
- Get GitHub connection: Read the app’s connection, if it has one.
- Disconnect a GitHub repository: Disconnect the app, leaving the repository on GitHub.
- Reconnect a GitHub repository: Reconnect an app to the repository it was disconnected from.
Sync
- Pull changes from GitHub: Pull new commits into the app.
- Resolve GitHub sync conflicts: Ask the AI to resolve merge conflicts from a pull.
- Push changes to GitHub: Push the app’s latest saved version.
- Turn automatic GitHub sync on or off: Choose whether outside commits are pulled in automatically.
- Import a GitHub branch: Create a Base44 branch from an existing GitHub branch.