curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/groups?token=' \
--header 'Content-Type: application/json' \
--data '
{
"acl": [
"business_user"
],
"description": "Users with administrative rights for the organization",
"displayName": [
{
"language": "en",
"value": "Organization Administrators"
}
],
"organization": "d1b33e20-715e-441d-145c-a0796122b6e0",
"type": [
"visibility"
],
"users": [
"john.doe+member@example.com"
]
}
'import requests
url = "https://sandbox.circularo.com/api/v1/groups?token="
payload = {
"acl": ["business_user"],
"description": "Users with administrative rights for the organization",
"displayName": [
{
"language": "en",
"value": "Organization Administrators"
}
],
"organization": "d1b33e20-715e-441d-145c-a0796122b6e0",
"type": ["visibility"],
"users": ["john.doe+member@example.com"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
acl: ['business_user'],
description: 'Users with administrative rights for the organization',
displayName: [{language: 'en', value: 'Organization Administrators'}],
organization: 'd1b33e20-715e-441d-145c-a0796122b6e0',
type: ['visibility'],
users: ['john.doe+member@example.com']
})
};
fetch('https://sandbox.circularo.com/api/v1/groups?token=', 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://sandbox.circularo.com/api/v1/groups?token=",
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([
'acl' => [
'business_user'
],
'description' => 'Users with administrative rights for the organization',
'displayName' => [
[
'language' => 'en',
'value' => 'Organization Administrators'
]
],
'organization' => 'd1b33e20-715e-441d-145c-a0796122b6e0',
'type' => [
'visibility'
],
'users' => [
'john.doe+member@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"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://sandbox.circularo.com/api/v1/groups?token="
payload := strings.NewReader("{\n \"acl\": [\n \"business_user\"\n ],\n \"description\": \"Users with administrative rights for the organization\",\n \"displayName\": [\n {\n \"language\": \"en\",\n \"value\": \"Organization Administrators\"\n }\n ],\n \"organization\": \"d1b33e20-715e-441d-145c-a0796122b6e0\",\n \"type\": [\n \"visibility\"\n ],\n \"users\": [\n \"john.doe+member@example.com\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://sandbox.circularo.com/api/v1/groups?token=")
.header("Content-Type", "application/json")
.body("{\n \"acl\": [\n \"business_user\"\n ],\n \"description\": \"Users with administrative rights for the organization\",\n \"displayName\": [\n {\n \"language\": \"en\",\n \"value\": \"Organization Administrators\"\n }\n ],\n \"organization\": \"d1b33e20-715e-441d-145c-a0796122b6e0\",\n \"type\": [\n \"visibility\"\n ],\n \"users\": [\n \"john.doe+member@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/groups?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"acl\": [\n \"business_user\"\n ],\n \"description\": \"Users with administrative rights for the organization\",\n \"displayName\": [\n {\n \"language\": \"en\",\n \"value\": \"Organization Administrators\"\n }\n ],\n \"organization\": \"d1b33e20-715e-441d-145c-a0796122b6e0\",\n \"type\": [\n \"visibility\"\n ],\n \"users\": [\n \"john.doe+member@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "e58cc1acbba3cd8056ce6adb44d46a11a113170e884509c179701270b915b59b",
"version": 3
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 402,
"type": "SUBSCRIPTION:NOT_ACTIVE",
"message": "Subscription not active",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Create a group
POST /groups
Creates a group and, if the body names any, puts its first members into it. A group is what carries permissions in Circularo: the ACLs listed on it grant their rights to everyone inside, and the same group can additionally hold shared settings for its members or serve as a group content is made visible to.
The identifier is assigned by the server, not chosen by the caller - take it from the id of the response and address the group by it from then on. A global administrator may file the group under any organization, an organization administrator always creates it in their own. An organization itself cannot be created here.
Everything the body references is verified before anything is written, so an unknown ACL, username or language rejects the whole call.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user rights: add_groups
Required user role: admin or organization_admin
curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/groups?token=' \
--header 'Content-Type: application/json' \
--data '
{
"acl": [
"business_user"
],
"description": "Users with administrative rights for the organization",
"displayName": [
{
"language": "en",
"value": "Organization Administrators"
}
],
"organization": "d1b33e20-715e-441d-145c-a0796122b6e0",
"type": [
"visibility"
],
"users": [
"john.doe+member@example.com"
]
}
'import requests
url = "https://sandbox.circularo.com/api/v1/groups?token="
payload = {
"acl": ["business_user"],
"description": "Users with administrative rights for the organization",
"displayName": [
{
"language": "en",
"value": "Organization Administrators"
}
],
"organization": "d1b33e20-715e-441d-145c-a0796122b6e0",
"type": ["visibility"],
"users": ["john.doe+member@example.com"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
acl: ['business_user'],
description: 'Users with administrative rights for the organization',
displayName: [{language: 'en', value: 'Organization Administrators'}],
organization: 'd1b33e20-715e-441d-145c-a0796122b6e0',
type: ['visibility'],
users: ['john.doe+member@example.com']
})
};
fetch('https://sandbox.circularo.com/api/v1/groups?token=', 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://sandbox.circularo.com/api/v1/groups?token=",
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([
'acl' => [
'business_user'
],
'description' => 'Users with administrative rights for the organization',
'displayName' => [
[
'language' => 'en',
'value' => 'Organization Administrators'
]
],
'organization' => 'd1b33e20-715e-441d-145c-a0796122b6e0',
'type' => [
'visibility'
],
'users' => [
'john.doe+member@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"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://sandbox.circularo.com/api/v1/groups?token="
payload := strings.NewReader("{\n \"acl\": [\n \"business_user\"\n ],\n \"description\": \"Users with administrative rights for the organization\",\n \"displayName\": [\n {\n \"language\": \"en\",\n \"value\": \"Organization Administrators\"\n }\n ],\n \"organization\": \"d1b33e20-715e-441d-145c-a0796122b6e0\",\n \"type\": [\n \"visibility\"\n ],\n \"users\": [\n \"john.doe+member@example.com\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://sandbox.circularo.com/api/v1/groups?token=")
.header("Content-Type", "application/json")
.body("{\n \"acl\": [\n \"business_user\"\n ],\n \"description\": \"Users with administrative rights for the organization\",\n \"displayName\": [\n {\n \"language\": \"en\",\n \"value\": \"Organization Administrators\"\n }\n ],\n \"organization\": \"d1b33e20-715e-441d-145c-a0796122b6e0\",\n \"type\": [\n \"visibility\"\n ],\n \"users\": [\n \"john.doe+member@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/groups?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"acl\": [\n \"business_user\"\n ],\n \"description\": \"Users with administrative rights for the organization\",\n \"displayName\": [\n {\n \"language\": \"en\",\n \"value\": \"Organization Administrators\"\n }\n ],\n \"organization\": \"d1b33e20-715e-441d-145c-a0796122b6e0\",\n \"type\": [\n \"visibility\"\n ],\n \"users\": [\n \"john.doe+member@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "e58cc1acbba3cd8056ce6adb44d46a11a113170e884509c179701270b915b59b",
"version": 3
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 402,
"type": "SUBSCRIPTION:NOT_ACTIVE",
"message": "Subscription not active",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Body
Names of the ACLs the group should carry. Their rights are what the group grants to its members. An ACL that is not allowed for organizations cannot be put on a group that belongs to one, and an organization administrator may use only ACLs their organization is entitled to - those of its edition, add-ons granted to it and feature ACLs.
1Identifier of the organization to file the group under, which has to be a group of type organization. Only a global administrator may choose it; for an organization administrator the value is ignored and their own organization is used.
"d1b33e20-715e-441d-145c-a0796122b6e0"
Extra roles the group should play besides granting its ACLs: settings makes it a carrier of shared configuration for its members, visibility makes it a group content can be made visible to. Leave it out for a plain user group. The remaining types describe an organization and its structure and cannot be created here.
settings, visibility ["visibility"]
Response
Returns the identifier and the version of the new group.