curl --request POST \
--url https://app.base44.com/api/workspace/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Design team",
"description": "Product designers",
"role": "editor",
"member_emails": [
"dana@acme.com",
"sam@acme.com"
]
}
'import requests
url = "https://app.base44.com/api/workspace/groups"
payload = {
"name": "Design team",
"description": "Product designers",
"role": "editor",
"member_emails": ["dana@acme.com", "sam@acme.com"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Design team',
description: 'Product designers',
role: 'editor',
member_emails: ['dana@acme.com', 'sam@acme.com']
})
};
fetch('https://app.base44.com/api/workspace/groups', 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/groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Design team',
'description' => 'Product designers',
'role' => 'editor',
'member_emails' => [
'dana@acme.com',
'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/groups"
payload := strings.NewReader("{\n \"name\": \"Design team\",\n \"description\": \"Product designers\",\n \"role\": \"editor\",\n \"member_emails\": [\n \"dana@acme.com\",\n \"sam@acme.com\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.base44.com/api/workspace/groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Design team\",\n \"description\": \"Product designers\",\n \"role\": \"editor\",\n \"member_emails\": [\n \"dana@acme.com\",\n \"sam@acme.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Design team\",\n \"description\": \"Product designers\",\n \"role\": \"editor\",\n \"member_emails\": [\n \"dana@acme.com\",\n \"sam@acme.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "68b4e1d2c9a7f3001e2d4b61",
"name": "Design team",
"source": "custom",
"member_count": 12,
"description": "Product designers",
"role": "editor",
"unresolved_count": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create workspace group
Creates a custom group in a workspace, optionally with a role and its first members.
Every member of a group gets the group’s role, and a member of several groups gets the highest of their roles. A group whose role is no_access blocks members who get their role only from it. Leave role out for a group that grants no role.
Only active members of the workspace can join a group. Pending invitees, guests, and the workspace owner can’t. To add someone who isn’t a member yet, invite them with Invite workspace member and pass group_id. If any address in member_emails can’t be added, nothing is created.
Group names are unique within a workspace, ignoring case, so retrying a create that succeeded returns a 400. You can’t make a change that removes your own admin access.
The response’s unresolved_count is always 0.
Groups need the Business plan or higher. Below it, this returns a 402.
This is limited to 60 requests per minute, shared with the other endpoints that change groups or their members. 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 POST \
--url https://app.base44.com/api/workspace/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Design team",
"description": "Product designers",
"role": "editor",
"member_emails": [
"dana@acme.com",
"sam@acme.com"
]
}
'import requests
url = "https://app.base44.com/api/workspace/groups"
payload = {
"name": "Design team",
"description": "Product designers",
"role": "editor",
"member_emails": ["dana@acme.com", "sam@acme.com"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Design team',
description: 'Product designers',
role: 'editor',
member_emails: ['dana@acme.com', 'sam@acme.com']
})
};
fetch('https://app.base44.com/api/workspace/groups', 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/groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Design team',
'description' => 'Product designers',
'role' => 'editor',
'member_emails' => [
'dana@acme.com',
'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/groups"
payload := strings.NewReader("{\n \"name\": \"Design team\",\n \"description\": \"Product designers\",\n \"role\": \"editor\",\n \"member_emails\": [\n \"dana@acme.com\",\n \"sam@acme.com\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.base44.com/api/workspace/groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Design team\",\n \"description\": \"Product designers\",\n \"role\": \"editor\",\n \"member_emails\": [\n \"dana@acme.com\",\n \"sam@acme.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Design team\",\n \"description\": \"Product designers\",\n \"role\": \"editor\",\n \"member_emails\": [\n \"dana@acme.com\",\n \"sam@acme.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "68b4e1d2c9a7f3001e2d4b61",
"name": "Design team",
"source": "custom",
"member_count": 12,
"description": "Product designers",
"role": "editor",
"unresolved_count": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Query Parameters
Body
Name of the group, up to 100 characters. Must be unique among the workspace's custom groups, ignoring case.
1 - 100"Design team"
Short description of the group's purpose, up to 500 characters.
500"Product designers"
Role every member gets: admin, editor, viewer, or no_access to block members who get their role only from this group. Leave it out, or send null, for a group that grants no role.
"editor"
Emails of active workspace members to add, up to 200.
200["dana@acme.com", "sam@acme.com"]
Response
The new group.
ID of the group.
"68b4e1d2c9a7f3001e2d4b61"
Name of the group.
"Design team"
custom for a group created in Base44, or idp for one your identity provider sends through SCIM. An idp group's name and members come from the identity provider.
"custom"
Number of members.
12
Short description of the group, or null when it has none.
"Product designers"
Role every member gets from the group: admin, editor, viewer, or no_access. null when the group grants no role.
"editor"
Members your identity provider sent who don't have a Base44 account in the workspace yet. Always 0 for a custom group.
0
Was this page helpful?