Set default workspace brand
curl --request PUT \
--url https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default', 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/workspace/{workspace_id}/brands/{brand_id}/default",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/workspace/{workspace_id}/brands/{brand_id}/default"
req, _ := http.NewRequest("PUT", 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.put("https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "'Nordwind' is now the default brand"
}Brands
Set default workspace brand
This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.
Makes a brand the workspace’s default, in place of any other. The default brand is the one Base44 selects for you when you start a new app.
A brand whose status is generating or failed can’t be the default. Setting the brand that’s already the default changes nothing.
This is limited to 60 requests per minute, shared with the other endpoints that change brands, except generating one. A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.
Call this as an owner or admin of the workspace, with a personal access token for that workspace sent as a Bearer token, or from a signed-in session. A read-only token is refused, and workspace API keys aren’t accepted.
The response includes fields beyond the ones documented here. Don’t rely on undocumented response fields, as they can change at any time.
PUT
/
api
/
workspace
/
{workspace_id}
/
brands
/
{brand_id}
/
default
Set default workspace brand
curl --request PUT \
--url https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default', 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/workspace/{workspace_id}/brands/{brand_id}/default",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/workspace/{workspace_id}/brands/{brand_id}/default"
req, _ := http.NewRequest("PUT", 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.put("https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/{workspace_id}/brands/{brand_id}/default")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "'Nordwind' is now the default brand"
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Was this page helpful?