curl --request PUT \
--url https://app.base44.com/api/workspace/members/bulk/credit-limit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"credit_limit": 500,
"email": "dana@acme.com"
},
{
"email": "sam@acme.com"
}
]
}
'import requests
url = "https://app.base44.com/api/workspace/members/bulk/credit-limit"
payload = { "items": [{
"credit_limit": 500,
"email": "dana@acme.com"
}, { "email": "sam@acme.com" }] }
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({items: [{credit_limit: 500, email: 'dana@acme.com'}, {email: 'sam@acme.com'}]})
};
fetch('https://app.base44.com/api/workspace/members/bulk/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/members/bulk/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([
'items' => [
[
'credit_limit' => 500,
'email' => 'dana@acme.com'
],
[
'email' => 'sam@acme.com'
]
]
]),
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/members/bulk/credit-limit"
payload := strings.NewReader("{\n \"items\": [\n {\n \"credit_limit\": 500,\n \"email\": \"dana@acme.com\"\n },\n {\n \"email\": \"sam@acme.com\"\n }\n ]\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/members/bulk/credit-limit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"credit_limit\": 500,\n \"email\": \"dana@acme.com\"\n },\n {\n \"email\": \"sam@acme.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/members/bulk/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 \"items\": [\n {\n \"credit_limit\": 500,\n \"email\": \"dana@acme.com\"\n },\n {\n \"email\": \"sam@acme.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"email": "dana@acme.com",
"message": "Member role updated to editor.",
"status": "success"
}
]
}{
"detail": {
"message": "Some members could not be updated. No changes were applied.",
"errors": [
{
"email": "sam@acme.com",
"error_code": "MEMBER_NOT_FOUND",
"message": "Member sam@acme.com not found in workspace 67e0b12c4d8a3f005b21c9e4"
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Set member credit limits in bulk
Sets or removes the credit limits of up to 200 members at once, the same way as Set member credit limit.
A limit can’t be more than the workspace’s monthly credits. Viewers can’t have a limit, since they can’t use credits, but you can remove one. The workspace owner is never limited.
Every item is checked before anything changes. If any item can’t be applied, nothing changes and the request returns a 400 whose detail.errors lists each rejected item with its email, a message, and an error_code when there is one. A member who isn’t in the workspace, or a change you couldn’t make on the single-member endpoint, is reported there rather than as a 403 or 404.
A 200 has one entry in results per item, in request order. An item whose member changed while the request ran comes back with status skipped and wasn’t applied. Count only success entries as done. A member who became a viewer, or whose membership changed, is skipped and keeps their limit.
Member credit limits need the Business plan or higher. Below it, this returns a 402.
This is limited to 5 requests per minute, shared by Update workspace member roles in bulk, Remove workspace members in bulk, and Set member credit limits in bulk. 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/members/bulk/credit-limit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"credit_limit": 500,
"email": "dana@acme.com"
},
{
"email": "sam@acme.com"
}
]
}
'import requests
url = "https://app.base44.com/api/workspace/members/bulk/credit-limit"
payload = { "items": [{
"credit_limit": 500,
"email": "dana@acme.com"
}, { "email": "sam@acme.com" }] }
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({items: [{credit_limit: 500, email: 'dana@acme.com'}, {email: 'sam@acme.com'}]})
};
fetch('https://app.base44.com/api/workspace/members/bulk/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/members/bulk/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([
'items' => [
[
'credit_limit' => 500,
'email' => 'dana@acme.com'
],
[
'email' => 'sam@acme.com'
]
]
]),
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/members/bulk/credit-limit"
payload := strings.NewReader("{\n \"items\": [\n {\n \"credit_limit\": 500,\n \"email\": \"dana@acme.com\"\n },\n {\n \"email\": \"sam@acme.com\"\n }\n ]\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/members/bulk/credit-limit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"credit_limit\": 500,\n \"email\": \"dana@acme.com\"\n },\n {\n \"email\": \"sam@acme.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/members/bulk/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 \"items\": [\n {\n \"credit_limit\": 500,\n \"email\": \"dana@acme.com\"\n },\n {\n \"email\": \"sam@acme.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"email": "dana@acme.com",
"message": "Member role updated to editor.",
"status": "success"
}
]
}{
"detail": {
"message": "Some members could not be updated. No changes were applied.",
"errors": [
{
"email": "sam@acme.com",
"error_code": "MEMBER_NOT_FOUND",
"message": "Member sam@acme.com not found in workspace 67e0b12c4d8a3f005b21c9e4"
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Query Parameters
Body
Credit limits to apply in one request.
The credit limits, 1 to 200. Each email can appear once.
1 - 200 elementsShow child attributes
Show child attributes
[
{
"credit_limit": 500,
"email": "dana@acme.com"
},
{ "email": "sam@acme.com" }
]
Response
The outcome for each member.
The outcome of each item.
One entry per item, in request order.
Show child attributes
Show child attributes
[
{
"email": "dana@acme.com",
"message": "Member role updated to editor.",
"status": "success"
}
]
Was this page helpful?