Updates multiple user groups. Returns 200 on success, or 400 if any entry fails validation.
Headers
-
API token (can be retrieved from account settings)
-
ID of organization, for which the operation must be performed
Body
Required
-
Entity ID. If negative value, a new entity will be created
-
User group type
Values are
GROUPorSUPER_GROUP. -
Group name
-
Group description
-
User (contact) IDs directly in this group
-
Nested user group IDs included in this group
-
Organization-level roles assigned to this group
-
Global roles assigned to this group
-
Whether this group uses an advanced rule expression instead of explicit member lists
-
Advanced rule expression. Only relevant when isAdvanced is true
POST
/api-v1/user-group/batch
curl \
--request POST 'https://wyzio.app/api-v1/user-group/batch' \
--header "Content-Type: application/json" \
--data '[{"id":12345678,"type":"STANDARD","name":"Finance Team","description":"Users with access to finance modules","userIds":[12345678],"groupIds":[12345678],"roles":[{"id":12345678}],"globalRoles":[{"id":12345678}],"isAdvanced":false,"rule":"department == 'Finance'"}]'
Request examples
# Headers
# Payload
[
{
"id": 12345678,
"type": "STANDARD",
"name": "Finance Team",
"description": "Users with access to finance modules",
"userIds": [
12345678
],
"groupIds": [
12345678
],
"roles": [
{
"id": 12345678
}
],
"globalRoles": [
{
"id": 12345678
}
],
"isAdvanced": false,
"rule": "department == 'Finance'"
}
]
Response examples (200)
{
"items": [
{
"errorCode": {
"errorCode": "NO_ERROR",
"errorDetailValues": [
{
"errorCode": "string",
"fieldName": "string",
"data": "string",
"isSevere": true
}
]
},
"possibleWorkflows": [
{
"id": 42,
"name": "string"
}
],
"error": true,
"severeError": true
}
]
}