curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/imported/git/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Add checkout page"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/imported/git/commit"
payload = { "message": "Add checkout page" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: 'Add checkout page'})
};
fetch('https://app.base44.com/api/apps/{app_id}/imported/git/commit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/imported/git/commit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => 'Add checkout page'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/imported/git/commit"
payload := strings.NewReader("{\n \"message\": \"Add checkout page\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/imported/git/commit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"Add checkout page\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/imported/git/commit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"Add checkout page\"\n}"
response = http.request(request)
puts response.read_bodyCommit branch changes
Commits a branch’s uncommitted changes and pushes them to the branch on GitHub. This works on apps imported from GitHub.
Send the branch as branch_id, or leave it out for the main branch. The call runs in that branch’s environment. If the environment isn’t running, the call starts it first, which can take a few minutes. Changes on the repository’s default branch can’t be committed: create a branch with Create branch and commit there. message sets the commit message, Manual commit from Base44 by default. The request waits for the push, and returns the branch’s new git state.
On some apps, an AI model first reviews the changes against the branch’s chat, which makes the call slower. It commits only the changes that belong to the branch’s feature, and keeps the rest uncommitted in the app’s preview. When none of the changes clearly belong, the call is refused with commit_review_required and nothing is committed: describe the changes to the AI in the app’s chat, then retry. Committing with no changes returns the current state, so you can retry safely.
This endpoint is limited to 10 requests per minute per user, shared with Discard branch changes, Revert branch file changes, Open pull request and Update pull request, and reported in the X-RateLimit-* headers.
api_key query parameter is refused.curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/imported/git/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Add checkout page"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/imported/git/commit"
payload = { "message": "Add checkout page" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: 'Add checkout page'})
};
fetch('https://app.base44.com/api/apps/{app_id}/imported/git/commit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/imported/git/commit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => 'Add checkout page'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/imported/git/commit"
payload := strings.NewReader("{\n \"message\": \"Add checkout page\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/imported/git/commit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"Add checkout page\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/imported/git/commit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"Add checkout page\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
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.
Path Parameters
ID of the app.
Query Parameters
ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.
Body
Commit message. Defaults to Manual commit from Base44.
"Add checkout page"
Response
The branch's git state after the push.
Branch checked out in the branch's environment, or HEAD when none is checked out.
"feature/checkout"
The repository's default branch on GitHub.
"main"
The branch the app was imported from. Pull requests merge into it.
"main"
SHA of the latest commit, or null when the branch has no commits.
"9fceb02d0ae598e95dc970b74767f19372d61af8"
When the latest commit was made, as an ISO 8601 UTC timestamp, or null.
"2026-10-28T09:15:00Z"
Whether there are uncommitted changes.
true
Paths of the first 20 files with uncommitted changes. A renamed file reads old -> new.
["src/pages/Checkout.jsx"]
Commits not pushed to GitHub yet, or null when the branch isn't on GitHub.
1
Commits on GitHub the environment doesn't have yet, as of its last fetch, or null when the branch isn't on GitHub.
0
Whether a merge is under way, for example while conflicts are resolved.
false
Was this page helpful?