curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/imported/git/pull-request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Add checkout flow",
"body": "Adds a checkout page.",
"progress_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/imported/git/pull-request"
payload = {
"title": "Add checkout flow",
"body": "Adds a checkout page.",
"progress_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
title: 'Add checkout flow',
body: JSON.stringify('Adds a checkout page.'),
progress_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/imported/git/pull-request', 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/pull-request",
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([
'title' => 'Add checkout flow',
'body' => 'Adds a checkout page.',
'progress_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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/pull-request"
payload := strings.NewReader("{\n \"title\": \"Add checkout flow\",\n \"body\": \"Adds a checkout page.\",\n \"progress_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/pull-request")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Add checkout flow\",\n \"body\": \"Adds a checkout page.\",\n \"progress_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/imported/git/pull-request")
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 \"title\": \"Add checkout flow\",\n \"body\": \"Adds a checkout page.\",\n \"progress_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyOpen pull request
Opens a GitHub pull request from one of the app’s branches into the branch the app was imported from. This works on apps imported from GitHub, and on apps connected to GitHub whose main branch protection GitHub manages.
Send the branch as branch_id. Any uncommitted changes on the branch are committed and pushed first, like Commit branch changes, and the request waits for that. title defaults to a name based on the branch. Base44 adds a short footer to body that links the pull request back to the app.
If the branch already has a pull request, the call returns it right away and commits nothing, so you can retry safely. To add later changes to that pull request, call Commit branch changes. The call is refused with no_changes when the branch changes no files.
This endpoint is limited to 10 requests per minute per user, shared with Commit branch changes, Discard branch changes, Revert branch file changes 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/pull-request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Add checkout flow",
"body": "Adds a checkout page.",
"progress_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/imported/git/pull-request"
payload = {
"title": "Add checkout flow",
"body": "Adds a checkout page.",
"progress_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
title: 'Add checkout flow',
body: JSON.stringify('Adds a checkout page.'),
progress_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/imported/git/pull-request', 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/pull-request",
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([
'title' => 'Add checkout flow',
'body' => 'Adds a checkout page.',
'progress_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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/pull-request"
payload := strings.NewReader("{\n \"title\": \"Add checkout flow\",\n \"body\": \"Adds a checkout page.\",\n \"progress_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/pull-request")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Add checkout flow\",\n \"body\": \"Adds a checkout page.\",\n \"progress_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/imported/git/pull-request")
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 \"title\": \"Add checkout flow\",\n \"body\": \"Adds a checkout page.\",\n \"progress_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.
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 opened pull request, or the branch's existing one.
Was this page helpful?