curl --request POST \
--url https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archiveimport requests
url = "https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive', 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}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
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": "ARCHIVED",
"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": "BAD_REQUEST",
"origin": "IDENTITY",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "groupId",
"message": "Invalid UUID",
"code": "GROUPID_UUID"
}
]
}Archive a group
Archives a group: it leaves the group list, can no longer be changed, and can no longer be used as an approver in business policies.
curl --request POST \
--url https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archiveimport requests
url = "https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive', 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}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.identity.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/groups/{groupId}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
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": "ARCHIVED",
"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": "BAD_REQUEST",
"origin": "IDENTITY",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "groupId",
"message": "Invalid UUID",
"code": "GROUPID_UUID"
}
]
}Path Parameters
ID of your realm.
Format: UUID
ID of the organization that owns the group.
Format: UUID
ID of the group to archive.
Format: UUID
Response
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 "ARCHIVED"
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"