Create SCIM group
POST
/scim/v2/Groups
Map the group to a role and environments with POST /group-mapping.
Request Body
displayNamestring
externalIdstring
membersobject[]
valuestring
Response Body
displayNamestring
Example:
EngineeringexternalIdstring
idstring
membersobject[]
displaystring
valuestring
The member's user ID.
metaobject
createdstring · date-time
lastModifiedstring · date-time
locationstring
resourceTypestring
Possible values:
UserGroup
schemasstring[]
Example:
["urn:ietf:params:scim:schemas:core:2.0:Group"]Errors
| Status | Description |
|---|---|
400 | No displayName. |
409 | The team already has a group with this externalId (scimType is uniqueness). |
curl -X POST 'https://api.truto.one/scim/v2/Groups' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"displayName": "your_displayName",
"externalId": "your_externalId",
"members": []
}'const body = {
"displayName": "your_displayName",
"externalId": "your_externalId",
"members": []
};
const response = await fetch('https://api.truto.one/scim/v2/Groups', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/scim/v2/Groups"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
payload = {
"displayName": "your_displayName",
"externalId": "your_externalId",
"members": []
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())