curl --request PUT \
--url 'https://sandbox.circularo.com/api/v1/groups/{id}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"version": 1,
"acl": [
"business_user"
],
"description": "Users with administrative rights for the organization",
"displayName": [
{
"language": "en",
"value": "Organization Administrators"
}
],
"subscription": "a1a72e58-ef8e-0b1d-9d5c-05596122bf13",
"type": [
"visibility"
],
"usersToBeAdded": [
"john.doe+member@example.com"
],
"usersToBeRemoved": [
"john.doe+member@example.com"
]
}
'import requests
url = "https://sandbox.circularo.com/api/v1/groups/{id}?token="
payload = {
"version": 1,
"acl": ["business_user"],
"description": "Users with administrative rights for the organization",
"displayName": [
{
"language": "en",
"value": "Organization Administrators"
}
],
"subscription": "a1a72e58-ef8e-0b1d-9d5c-05596122bf13",
"type": ["visibility"],
"usersToBeAdded": ["john.doe+member@example.com"],
"usersToBeRemoved": ["john.doe+member@example.com"]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: 1,
acl: ['business_user'],
description: 'Users with administrative rights for the organization',
displayName: [{language: 'en', value: 'Organization Administrators'}],
subscription: 'a1a72e58-ef8e-0b1d-9d5c-05596122bf13',
type: ['visibility'],
usersToBeAdded: ['john.doe+member@example.com'],
usersToBeRemoved: ['john.doe+member@example.com']
})
};
fetch('https://sandbox.circularo.com/api/v1/groups/{id}?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/{id}?token=",
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([
'version' => 1,
'acl' => [
'business_user'
],
'description' => 'Users with administrative rights for the organization',
'displayName' => [
[
'language' => 'en',
'value' => 'Organization Administrators'
]
],
'subscription' => 'a1a72e58-ef8e-0b1d-9d5c-05596122bf13',
'type' => [
'visibility'
],
'usersToBeAdded' => [
'john.doe+member@example.com'
],
'usersToBeRemoved' => [
'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/{id}?token="
payload := strings.NewReader("{\n \"version\": 1,\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 \"subscription\": \"a1a72e58-ef8e-0b1d-9d5c-05596122bf13\",\n \"type\": [\n \"visibility\"\n ],\n \"usersToBeAdded\": [\n \"john.doe+member@example.com\"\n ],\n \"usersToBeRemoved\": [\n \"john.doe+member@example.com\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox.circularo.com/api/v1/groups/{id}?token=")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\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 \"subscription\": \"a1a72e58-ef8e-0b1d-9d5c-05596122bf13\",\n \"type\": [\n \"visibility\"\n ],\n \"usersToBeAdded\": [\n \"john.doe+member@example.com\"\n ],\n \"usersToBeRemoved\": [\n \"john.doe+member@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/groups/{id}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\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 \"subscription\": \"a1a72e58-ef8e-0b1d-9d5c-05596122bf13\",\n \"type\": [\n \"visibility\"\n ],\n \"usersToBeAdded\": [\n \"john.doe+member@example.com\"\n ],\n \"usersToBeRemoved\": [\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"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Update a group
PUT /groups/{id}
Rewrites a group and, in the same call, adds and removes its members. Read the group first and send back the version it returned, so a concurrent change is not overwritten silently. The body replaces the stored record rather than patching it, so send every value you want to keep.
What the call may actually change depends on the caller. A global administrator rewrites the description, the localized names, the group’s types and the ACLs it carries, and on an organization also its edition and the subscription assigned to it. An organization administrator works inside their own organization only, and for them the group’s types, its edition and its subscription are taken from the stored group whatever the body says. The organization a group belongs to, and the role groups of an organization, cannot be changed here by anyone.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user rights: update_groups
Required user role: admin or organization_admin
curl --request PUT \
--url 'https://sandbox.circularo.com/api/v1/groups/{id}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"version": 1,
"acl": [
"business_user"
],
"description": "Users with administrative rights for the organization",
"displayName": [
{
"language": "en",
"value": "Organization Administrators"
}
],
"subscription": "a1a72e58-ef8e-0b1d-9d5c-05596122bf13",
"type": [
"visibility"
],
"usersToBeAdded": [
"john.doe+member@example.com"
],
"usersToBeRemoved": [
"john.doe+member@example.com"
]
}
'import requests
url = "https://sandbox.circularo.com/api/v1/groups/{id}?token="
payload = {
"version": 1,
"acl": ["business_user"],
"description": "Users with administrative rights for the organization",
"displayName": [
{
"language": "en",
"value": "Organization Administrators"
}
],
"subscription": "a1a72e58-ef8e-0b1d-9d5c-05596122bf13",
"type": ["visibility"],
"usersToBeAdded": ["john.doe+member@example.com"],
"usersToBeRemoved": ["john.doe+member@example.com"]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: 1,
acl: ['business_user'],
description: 'Users with administrative rights for the organization',
displayName: [{language: 'en', value: 'Organization Administrators'}],
subscription: 'a1a72e58-ef8e-0b1d-9d5c-05596122bf13',
type: ['visibility'],
usersToBeAdded: ['john.doe+member@example.com'],
usersToBeRemoved: ['john.doe+member@example.com']
})
};
fetch('https://sandbox.circularo.com/api/v1/groups/{id}?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/{id}?token=",
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([
'version' => 1,
'acl' => [
'business_user'
],
'description' => 'Users with administrative rights for the organization',
'displayName' => [
[
'language' => 'en',
'value' => 'Organization Administrators'
]
],
'subscription' => 'a1a72e58-ef8e-0b1d-9d5c-05596122bf13',
'type' => [
'visibility'
],
'usersToBeAdded' => [
'john.doe+member@example.com'
],
'usersToBeRemoved' => [
'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/{id}?token="
payload := strings.NewReader("{\n \"version\": 1,\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 \"subscription\": \"a1a72e58-ef8e-0b1d-9d5c-05596122bf13\",\n \"type\": [\n \"visibility\"\n ],\n \"usersToBeAdded\": [\n \"john.doe+member@example.com\"\n ],\n \"usersToBeRemoved\": [\n \"john.doe+member@example.com\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox.circularo.com/api/v1/groups/{id}?token=")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\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 \"subscription\": \"a1a72e58-ef8e-0b1d-9d5c-05596122bf13\",\n \"type\": [\n \"visibility\"\n ],\n \"usersToBeAdded\": [\n \"john.doe+member@example.com\"\n ],\n \"usersToBeRemoved\": [\n \"john.doe+member@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/groups/{id}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\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 \"subscription\": \"a1a72e58-ef8e-0b1d-9d5c-05596122bf13\",\n \"type\": [\n \"visibility\"\n ],\n \"usersToBeAdded\": [\n \"john.doe+member@example.com\"\n ],\n \"usersToBeRemoved\": [\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"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Path Parameters
Body
Names of the ACLs the group should carry from now on, replacing the ones stored. Their rights are what the group grants to its members, so an empty array or null leaves the members with nothing from this group. An organization administrator may add only ACLs their organization is entitled to - those of its edition, add-ons granted to it and feature ACLs - and cannot change the ACLs of the organization itself or of its role groups.
"business_user"
Edition the organization runs on. It decides which ACLs the organization's role groups carry, so changing it re-synchronizes them and their members gain and lose rights accordingly. On a group of type organization the value cannot be cleared - omit it to keep the stored one. An organization administrator cannot change it.
null, pro, business, start Identifier of the subscription assigned to the group. It can be set while none is assigned and cannot be swapped for another one afterwards; assigning one to an organization requires the subscription to exist and to be active. An organization administrator cannot change it, the stored value is kept.
"a1a72e58-ef8e-0b1d-9d5c-05596122bf13"
Extra roles the group plays 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. An organization and its role groups keep the types they were created with whatever is sent here, and so does every group updated by an organization administrator.
organization, settings, visibility, role, feature ["visibility"]
Response
Returns the identifier and the new version of the group.