Skip to content
PATCH /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

idstring
required·

Group mapping id (gmap_…).

Request Body

role_idsstring[]

Replaces the mapped role; at most one.

scim_group_idstring

Response Body

created_atstring · date-time
idstring

Group mapping id (gmap_…).

role_idsstring[]

The single role (role_…) every member of that group receives.

scim_group_idstring

SCIM group from GET /scim-group.

updated_atstring · date-time
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())