curl --request PUT \
--url https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Finance approvers",
"description": "Approves payments above R$ 10,000",
"memberIds": [
"e3553bc1-5e20-4e17-b22a-a796fda0aa99"
]
}
'import requests
url = "https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}"
payload = {
"name": "Finance approvers",
"description": "Approves payments above R$ 10,000",
"memberIds": ["e3553bc1-5e20-4e17-b22a-a796fda0aa99"]
}
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({
name: 'Finance approvers',
description: 'Approves payments above R$ 10,000',
memberIds: ['e3553bc1-5e20-4e17-b22a-a796fda0aa99']
})
};
fetch('https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}', 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://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}",
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([
'name' => 'Finance approvers',
'description' => 'Approves payments above R$ 10,000',
'memberIds' => [
'e3553bc1-5e20-4e17-b22a-a796fda0aa99'
]
]),
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://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}"
payload := strings.NewReader("{\n \"name\": \"Finance approvers\",\n \"description\": \"Approves payments above R$ 10,000\",\n \"memberIds\": [\n \"e3553bc1-5e20-4e17-b22a-a796fda0aa99\"\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://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Finance approvers\",\n \"description\": \"Approves payments above R$ 10,000\",\n \"memberIds\": [\n \"e3553bc1-5e20-4e17-b22a-a796fda0aa99\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}")
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 \"name\": \"Finance approvers\",\n \"description\": \"Approves payments above R$ 10,000\",\n \"memberIds\": [\n \"e3553bc1-5e20-4e17-b22a-a796fda0aa99\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "8ae5ee60-6ebe-4d85-a056-8c1387763478",
"realm": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organization": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"name": "Finance approvers",
"memberIds": [
"e3553bc1-5e20-4e17-b22a-a796fda0aa99"
],
"status": "ACTIVE",
"description": "Approves payments above R$ 10,000",
"createdBy": "f1235202-71e0-49ef-a8ba-939b8d3ec945",
"updatedBy": "f1235202-71e0-49ef-a8ba-939b8d3ec945",
"createdAt": "2026-10-02T13:27:41.512Z",
"updatedAt": "2026-10-09T17:05:12.034Z"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "GROUP_NOT_FOUND",
"origin": "IDENTITY",
"message": "Group not found"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "GROUP_ARCHIVED",
"origin": "IDENTITY",
"message": "This group is archived and can no longer be used or modified"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "GROUP_MEMBER_NOT_IN_ORGANIZATION",
"origin": "IDENTITY",
"message": "All group members must be users of this organization"
}Update a group
Changes a group’s name, description or members. Fields you omit keep their current value.
curl --request PUT \
--url https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Finance approvers",
"description": "Approves payments above R$ 10,000",
"memberIds": [
"e3553bc1-5e20-4e17-b22a-a796fda0aa99"
]
}
'import requests
url = "https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}"
payload = {
"name": "Finance approvers",
"description": "Approves payments above R$ 10,000",
"memberIds": ["e3553bc1-5e20-4e17-b22a-a796fda0aa99"]
}
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({
name: 'Finance approvers',
description: 'Approves payments above R$ 10,000',
memberIds: ['e3553bc1-5e20-4e17-b22a-a796fda0aa99']
})
};
fetch('https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}', 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://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}",
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([
'name' => 'Finance approvers',
'description' => 'Approves payments above R$ 10,000',
'memberIds' => [
'e3553bc1-5e20-4e17-b22a-a796fda0aa99'
]
]),
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://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}"
payload := strings.NewReader("{\n \"name\": \"Finance approvers\",\n \"description\": \"Approves payments above R$ 10,000\",\n \"memberIds\": [\n \"e3553bc1-5e20-4e17-b22a-a796fda0aa99\"\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://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Finance approvers\",\n \"description\": \"Approves payments above R$ 10,000\",\n \"memberIds\": [\n \"e3553bc1-5e20-4e17-b22a-a796fda0aa99\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}")
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 \"name\": \"Finance approvers\",\n \"description\": \"Approves payments above R$ 10,000\",\n \"memberIds\": [\n \"e3553bc1-5e20-4e17-b22a-a796fda0aa99\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "8ae5ee60-6ebe-4d85-a056-8c1387763478",
"realm": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organization": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"name": "Finance approvers",
"memberIds": [
"e3553bc1-5e20-4e17-b22a-a796fda0aa99"
],
"status": "ACTIVE",
"description": "Approves payments above R$ 10,000",
"createdBy": "f1235202-71e0-49ef-a8ba-939b8d3ec945",
"updatedBy": "f1235202-71e0-49ef-a8ba-939b8d3ec945",
"createdAt": "2026-10-02T13:27:41.512Z",
"updatedAt": "2026-10-09T17:05:12.034Z"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "GROUP_NOT_FOUND",
"origin": "IDENTITY",
"message": "Group not found"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "GROUP_ARCHIVED",
"origin": "IDENTITY",
"message": "This group is archived and can no longer be used or modified"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "GROUP_MEMBER_NOT_IN_ORGANIZATION",
"origin": "IDENTITY",
"message": "All group members must be users of this organization"
}memberIds replaces the whole member list, and every member must be an active user of the organization. Archived groups can’t be changed.Path Parameters
ID of your realm.
Format: UUID
ID of the organization that owns the group.
Format: UUID
ID of the group to update.
Format: UUID
Body
New name of the group. Must be unique within the organization, archived groups included; leading and trailing spaces are removed.
1 - 80"Finance approvers"
New description of the group. Send an empty string to clear it.
500"Approves payments above R$ 10,000"
The complete new list of members: it replaces the current one. IDs must not repeat, and each one must be an active user of the organization.
Format: UUID
Example: ["e3553bc1-5e20-4e17-b22a-a796fda0aa99","61a1505a-7516-4f5b-8491-e8f8cbfd1083"]
1 - 100 elementsResponse
Successful response
A group: a named set of users of one organization, used as an approver in business policies.
ID of the group.
"8ae5ee60-6ebe-4d85-a056-8c1387763478"
ID of the realm the group belongs to.
"f495ff0c-ab54-4f99-8e92-ca8682e4de9b"
ID of the organization the group belongs to.
"c4bd3f21-dfbd-44e8-8055-68ba15bed410"
Name of the group, unique within the organization (archived groups included).
"Finance approvers"
IDs of the users in the group, in the order they were added.
Example: ["e3553bc1-5e20-4e17-b22a-a796fda0aa99"]
ACTIVE groups can be changed and used as approvers. ARCHIVED groups can still be read by ID, but are hidden from the list, can't be changed and can't be used as approvers. Archiving is permanent.
ACTIVE, ARCHIVED "ACTIVE"
Description of the group. Omitted, or empty, when the group has none.
"Approves payments above R$ 10,000"
ID of the user or API client that created the group. May be absent on older groups.
"f1235202-71e0-49ef-a8ba-939b8d3ec945"
ID of the user or API client that last changed the group. May be absent on older groups.
"f1235202-71e0-49ef-a8ba-939b8d3ec945"
When the group was created.
"2026-10-02T13:27:41.512Z"
When the group last changed.
"2026-10-09T17:05:12.034Z"