curl --request PUT \
--url https://app.base44.com/api/workspace/default-credit-limit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_credit_limit": 300
}
'import requests
url = "https://app.base44.com/api/workspace/default-credit-limit"
payload = { "default_credit_limit": 300 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({default_credit_limit: 300})
};
fetch('https://app.base44.com/api/workspace/default-credit-limit', 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/default-credit-limit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'default_credit_limit' => 300
]),
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/workspace/default-credit-limit"
payload := strings.NewReader("{\n \"default_credit_limit\": 300\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.base44.com/api/workspace/default-credit-limit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_credit_limit\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/default-credit-limit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"default_credit_limit\": 300\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Default credit limit set to 300."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Set default member credit limit
Sets the credit limit for every member of a workspace who doesn’t have their own, or removes it when default_credit_limit is null. Members with their own limit keep it. List workspace members shows the default in a member’s credit_limit, with is_default_limit set to true.
The default can’t be more than the workspace’s monthly credits. The workspace owner is never limited. Setting the same default again changes nothing, so retrying is safe.
Member credit limits need the Business plan or higher. Below it, this returns a 402.
This is limited to 30 requests per minute, shared with Update workspace member role, Remove workspace member, Set member credit limit, and Set default member credit limit. A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.
curl --request PUT \
--url https://app.base44.com/api/workspace/default-credit-limit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_credit_limit": 300
}
'import requests
url = "https://app.base44.com/api/workspace/default-credit-limit"
payload = { "default_credit_limit": 300 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({default_credit_limit: 300})
};
fetch('https://app.base44.com/api/workspace/default-credit-limit', 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/default-credit-limit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'default_credit_limit' => 300
]),
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/workspace/default-credit-limit"
payload := strings.NewReader("{\n \"default_credit_limit\": 300\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.base44.com/api/workspace/default-credit-limit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_credit_limit\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/default-credit-limit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"default_credit_limit\": 300\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Default credit limit set to 300."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Query Parameters
Body
The workspace's default member credit limit.
Most credits each member without their own limit can use in the workspace each month, at least 1. null, or leaving it out, removes the default.
x >= 1300
Was this page helpful?