Public/New-GCGroup.ps1

<#
.SYNOPSIS
    Creates a new group in Genesys Cloud.

.DESCRIPTION
    Creates a new group in Genesys Cloud by sending a POST request.
    API Endpoint: POST /api/v2/groups

.PARAMETER Body
    The request body containing the group properties. Accepts a hashtable or JSON string.
    Required properties typically include 'name' and 'type'.

.EXAMPLE
    New-GCGroup -Body @{ name = 'Support Team'; type = 'official'; description = 'Main support group' }
    Creates a new group with the specified properties.

.NOTES
    Genesys Cloud API: POST /api/v2/groups
#>

function New-GCGroup {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [object]$Body
    )

    $endpoint = "groups"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method POST -Body $Body
}