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_body{
"current_branch": "feature/checkout",
"default_branch": "main",
"base_branch": "main",
"head": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"head_committed_at": "2026-10-28T09:15:00Z",
"dirty": false,
"dirty_files": [],
"ahead": 0,
"behind": 0,
"merge_in_progress": false
}Commit 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_body{
"current_branch": "feature/checkout",
"default_branch": "main",
"base_branch": "main",
"head": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"head_committed_at": "2026-10-28T09:15:00Z",
"dirty": false,
"dirty_files": [],
"ahead": 0,
"behind": 0,
"merge_in_progress": false
}Authorizations
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.
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
Response
The branch's git state after the push.
Was this page helpful?