Public/New-GCNotificationChannelSubscription.ps1
|
<# .SYNOPSIS Creates subscriptions on a notification channel. .DESCRIPTION Adds subscriptions to a notification channel in Genesys Cloud. Uses the POST /api/v2/notifications/channels/{channelId}/subscriptions endpoint. .PARAMETER ChannelId The unique identifier of the notification channel. .PARAMETER Body The subscription definition array containing topic IDs. .EXAMPLE $subBody = @(@{ id = 'v2.users.{userId}.presence' }) New-GCNotificationChannelSubscription -ChannelId 'channel-id' -Body $subBody .NOTES Genesys Cloud API: POST /api/v2/notifications/channels/{channelId}/subscriptions #> function New-GCNotificationChannelSubscription { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$ChannelId, [Parameter(Mandatory = $true)] [object]$Body ) $endpoint = "notifications/channels/$ChannelId/subscriptions" return Invoke-GCApiRequest -Endpoint $endpoint -Method POST -Body $Body } |