Public/New-GCUser.ps1
|
<# .SYNOPSIS Creates a new user in Genesys Cloud. .DESCRIPTION Creates a new user in Genesys Cloud by sending a POST request to the users endpoint. The body should contain the user properties such as name, email, department, etc. API Endpoint: POST /api/v2/users .PARAMETER Body The request body containing the user properties. Accepts a hashtable or JSON string. Required properties typically include 'name' and 'email'. .EXAMPLE New-GCUser -Body @{ name = 'John Doe'; email = 'john.doe@example.com'; department = 'IT' } Creates a new user with the specified name, email, and department. .EXAMPLE New-GCUser -Body '{"name": "Jane Smith", "email": "jane.smith@example.com"}' Creates a new user using a JSON string body. .NOTES Genesys Cloud API: POST /api/v2/users #> function New-GCUser { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [object]$Body ) $endpoint = "users" return Invoke-GCApiRequest -Endpoint $endpoint -Method POST -Body $Body } |