curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/github/sync/toggle \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": false
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/sync/toggle"
payload = { "enabled": False }
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({enabled: false})
};
fetch('https://app.base44.com/api/apps/{app_id}/github/sync/toggle', 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/toggle",
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([
'enabled' => false
]),
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}/github/sync/toggle"
payload := strings.NewReader("{\n \"enabled\": false\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}/github/sync/toggle")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/github/sync/toggle")
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 \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"sync_enabled": false
}Turn automatic GitHub sync on or off
Turns automatic sync between the app and its connected GitHub repository on or off.
Automatic sync brings in commits pushed to the repository from outside Base44. While it’s on, the Base44 editor pulls them in as soon as GitHub reports them, as long as someone has the app open in it. While it’s off, Base44 ignores those reports, so new commits come in only when someone opens the app in the editor or you call Pull changes from GitHub. The setting covers the app’s main line and its branches alike.
The setting doesn’t affect the other direction. Base44 commits every change the builder saves to the repository whether automatic sync is on or off, and Push changes to GitHub works either way.
If the repository receives more than 20 pushes within a minute, counting Base44’s own, Base44 pauses automatic sync for an hour to stop a sync loop. Pushes during the pause are ignored whatever the setting. When the pause ends, Base44 turns automatic sync back on only if the pause is what turned it off. A setting you chose with this endpoint, before or during the pause, is kept. Turning sync on during a pause doesn’t end the pause early.
Anyone with editor access to the app can change the setting. Reconnect a GitHub repository turns it back on.
This is limited to 10 requests a minute per app for each workspace’s personal API keys, so every key in a workspace shares one allowance. Some workspaces have a different limit.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/github/sync/toggle \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": false
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/sync/toggle"
payload = { "enabled": False }
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({enabled: false})
};
fetch('https://app.base44.com/api/apps/{app_id}/github/sync/toggle', 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/toggle",
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([
'enabled' => false
]),
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}/github/sync/toggle"
payload := strings.NewReader("{\n \"enabled\": false\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}/github/sync/toggle")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/github/sync/toggle")
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 \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"sync_enabled": false
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
ID of the app whose GitHub sync this affects.
Body
The automatic sync setting to apply.
Turn automatic sync on (true) or off (false).
false
Response
The setting was saved.
Was this page helpful?