Public/Set-GCUsersBulk.ps1
|
<# .SYNOPSIS Updates multiple users in bulk in Genesys Cloud. .DESCRIPTION Performs a bulk update of multiple users using a PATCH request. The body should contain an array of user objects with their IDs and the properties to update. API Endpoint: PATCH /api/v2/users/bulk .PARAMETER Body The request body containing an array of user update objects. Accepts a hashtable or JSON string. Each object should include the user 'id' and the fields to update. .EXAMPLE Set-GCUsersBulk -Body @(@{ id = 'user-id-1'; department = 'Sales' }, @{ id = 'user-id-2'; department = 'Sales' }) Updates the department for multiple users in a single request. .NOTES Genesys Cloud API: PATCH /api/v2/users/bulk #> function Set-GCUsersBulk { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [object]$Body ) $endpoint = "users/bulk" return Invoke-GCApiRequest -Endpoint $endpoint -Method PATCH -Body $Body } |