Public/New-GCCoachingAppointment.ps1

<#
.SYNOPSIS
    Creates a new coaching appointment.

.DESCRIPTION
    Creates a new coaching appointment in Genesys Cloud.
    Uses the POST /api/v2/coaching/appointments endpoint.

.PARAMETER Body
    The coaching appointment definition object.

.EXAMPLE
    $apptBody = @{ name = 'Weekly Coaching'; dateStart = '2024-02-01T10:00:00Z'; lengthInMinutes = 30 }
    New-GCCoachingAppointment -Body $apptBody

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

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

    $endpoint = "coaching/appointments"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method POST -Body $Body
}