Public/Remove-GCGroup.ps1

<#
.SYNOPSIS
    Deletes a group from Genesys Cloud.

.DESCRIPTION
    Removes a group from Genesys Cloud by sending a DELETE request.
    API Endpoint: DELETE /api/v2/groups/{groupId}

.PARAMETER GroupId
    The unique identifier of the group to delete.

.EXAMPLE
    Remove-GCGroup -GroupId '12345678-1234-1234-1234-123456789012'
    Deletes the group with the specified ID.

.NOTES
    Genesys Cloud API: DELETE /api/v2/groups/{groupId}
#>

function Remove-GCGroup {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$GroupId
    )

    $endpoint = "groups/$GroupId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method DELETE
}