curl --request PATCH \
--url https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auto_renew": false
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration"
payload = { "auto_renew": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({auto_renew: false})
};
fetch('https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration', 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}/custom-domains/{domain_id}/registration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'auto_renew' => 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}/custom-domains/{domain_id}/registration"
payload := strings.NewReader("{\n \"auto_renew\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auto_renew\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auto_renew\": false\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}Update a domain registration
Turns automatic renewal on or off for a domain bought through Base44 for the app. Pass the domain’s domain_id from List domain registrations.
With automatic renewal off, the domain lapses when its current period ends, at the expires_at that List domain registrations reports. Turning it back on renews the domain at that point, charged to the payment method on the domain’s subscription. The workspace’s billing page lists that subscription.
A successful call returns no body. It means the registrar accepted the change. List domain registrations can take a short while to show it, so read it again rather than relying on the first read.
If the registrar can’t be reached, the change may not have been made. Read the registration before you retry.
Only a workspace owner can change a registration, because renewal is managed for the whole workspace. Domains you own elsewhere can’t be changed here. Their renewal lives with your own registrar.
curl --request PATCH \
--url https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auto_renew": false
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration"
payload = { "auto_renew": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({auto_renew: false})
};
fetch('https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration', 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}/custom-domains/{domain_id}/registration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'auto_renew' => 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}/custom-domains/{domain_id}/registration"
payload := strings.NewReader("{\n \"auto_renew\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auto_renew\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/custom-domains/{domain_id}/registration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auto_renew\": false\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "App not found",
"details": {}
}
}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 the domain belongs to.
ID of the custom domain. Get this from List custom domains.
Body
Whether the registration renews automatically (true) or lapses at the end of its current period (false).
false
Response
The registrar accepted the change.
Was this page helpful?