Public/Set-GCTeam.ps1

<#
.SYNOPSIS
    Updates an existing team.

.DESCRIPTION
    Partially updates the specified team in Genesys Cloud.
    Uses the PATCH /api/v2/teams/{teamId} endpoint.

.PARAMETER TeamId
    The unique identifier of the team to update.

.PARAMETER Body
    The updated team properties.

.EXAMPLE
    $teamBody = @{ name = 'Updated Team Name' }
    Set-GCTeam -TeamId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' -Body $teamBody

.NOTES
    Genesys Cloud API: PATCH /api/v2/teams/{teamId}
#>

function Set-GCTeam {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$TeamId,

        [Parameter(Mandatory = $true)]
        [object]$Body
    )

    $endpoint = "teams/$TeamId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method PATCH -Body $Body
}