Public/Set-GCVoicemailMessage.ps1
|
<# .SYNOPSIS Updates a voicemail message. .DESCRIPTION Updates the specified voicemail message in Genesys Cloud (e.g., mark as read). Uses the PUT /api/v2/voicemail/messages/{messageId} endpoint. .PARAMETER MessageId The unique identifier of the voicemail message to update. .PARAMETER Body The updated voicemail message properties. .EXAMPLE $msgBody = @{ read = $true } Set-GCVoicemailMessage -MessageId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' -Body $msgBody .NOTES Genesys Cloud API: PUT /api/v2/voicemail/messages/{messageId} #> function Set-GCVoicemailMessage { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$MessageId, [Parameter(Mandatory = $true)] [object]$Body ) $endpoint = "voicemail/messages/$MessageId" return Invoke-GCApiRequest -Endpoint $endpoint -Method PUT -Body $Body } |