curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/github/sync/manual \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/sync/manual"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/github/sync/manual', 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}/github/sync/manual",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/github/sync/manual"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/github/sync/manual")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/github/sync/manual")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"commits_pushed": true,
"skipped": false,
"commit_hash": "4c7e1f90ab3d5628e1a0f7b24c9d8e6350a1b2c4",
"error": "App not connected to GitHub",
"duration_ms": 2860
}Push changes to GitHub
Pushes the app’s latest saved version to the connected repository.
Base44 pushes each saved version by itself, whether or not automatic sync is on. Use this when a push failed.
The push commits the app’s latest saved version on the main line, so it publishes saved work rather than the current chat turn, and it never pushes a Base44 branch.
A failed push is reported in the response body rather than as an error, so read success and error.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/github/sync/manual \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/sync/manual"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/github/sync/manual', 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}/github/sync/manual",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/github/sync/manual"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/github/sync/manual")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/github/sync/manual")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"commits_pushed": true,
"skipped": false,
"commit_hash": "4c7e1f90ab3d5628e1a0f7b24c9d8e6350a1b2c4",
"error": "App not connected to GitHub",
"duration_ms": 2860
}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.
Path Parameters
ID of the app whose GitHub sync this affects.
Response
The outcome of the push.
Outcome of a push to the connected repository.
Whether the push succeeded.
true
Whether the push moved the repository forward. The value is false both when the repository already had this commit and when nothing was pushed at all.
true
Whether the push was skipped. This is true for exactly one reason, which is that the connection carries no GitHub App installation. Every other reason nothing was pushed comes back false, including no connection at all and a connection in error or revoked, so read error rather than this flag.
false
Commit pushed to the repository, or null when nothing was pushed.
"4c7e1f90ab3d5628e1a0f7b24c9d8e6350a1b2c4"
Why the push didn't happen, or null when it succeeded. Plain text, not a code you can branch on.
"App not connected to GitHub"
How long the push took, in milliseconds, or null when Base44 rejected the request before starting one.
2860
Was this page helpful?