curl --request PUT \
--url https://app.base44.com/api/workspace/members/{email}/role \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "editor"
}
'import requests
url = "https://app.base44.com/api/workspace/members/{email}/role"
payload = { "role": "editor" }
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({role: 'editor'})
};
fetch('https://app.base44.com/api/workspace/members/{email}/role', 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/{email}/role",
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([
'role' => 'editor'
]),
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/{email}/role"
payload := strings.NewReader("{\n \"role\": \"editor\"\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/{email}/role")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"editor\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/members/{email}/role")
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 \"role\": \"editor\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Member role updated successfully."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update workspace member role
Changes a member’s role in a workspace to admin, editor, or viewer. The new role applies right away. For someone whose invitation is still pending, it’s the role they get when they accept.
You can’t change your own role or the owner’s. A role that a group grants can only be changed at the group, with Update workspace group or by changing its members. admin needs the Business plan or higher. Moving someone to viewer removes their own credit limit, and promoting a guest makes them a full member. Setting the role a member already has succeeds, so retrying is safe.
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/members/{email}/role \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "editor"
}
'import requests
url = "https://app.base44.com/api/workspace/members/{email}/role"
payload = { "role": "editor" }
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({role: 'editor'})
};
fetch('https://app.base44.com/api/workspace/members/{email}/role', 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/{email}/role",
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([
'role' => 'editor'
]),
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/{email}/role"
payload := strings.NewReader("{\n \"role\": \"editor\"\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/{email}/role")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"editor\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/members/{email}/role")
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 \"role\": \"editor\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Member role updated successfully."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
Email of the member whose role to change, exactly as email in List workspace members returns it. Matching is exact, including case. URL-encode it: @ as %40 and + as %2B.
Query Parameters
Body
A member's new role.
The member's new role. admin needs the Business plan or higher.
admin, editor, viewer "editor"
Was this page helpful?