Update a group mapping
/group-mapping/{id}
Updates a group mapping. **`role_ids` REPLACES the mapped role when present** — at most one role, since a member holds exactly one (two or more answers 400 `role_cardinality`). Members lose the old mapped role on their next recompute; manually assigned roles are untouched and always win. Requires `sso:manage`, and — because a mapping is a deferred grant applied with no actor present — you may only map a role whose permissions you hold yourself. A browser session must also pass a fresh step-up reauthentication in the app (without it the call answers `428 step_up_required`). An organization API token is not challenged.
Path Parameters
Group mapping id (gmap_…).
Request Body
Replaces the mapped role; at most one.
Response Body
Group mapping id (gmap_…).
The single role (role_…) every member of that group receives.
SCIM group from GET /scim-group.
curl -X PATCH 'https://api.elaichi.ai/group-mapping/<id>' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"scim_group_id":"your_scim_group_id","role_ids":[]}'const body = {
"scim_group_id": "your_scim_group_id",
"role_ids": []
};
const response = await fetch('https://api.elaichi.ai/group-mapping/<id>', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/group-mapping/<id>"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"scim_group_id": "your_scim_group_id",
"role_ids": []
}
response = requests.patch(url, headers=headers, json=payload)
print(response.json())