Public/New-GCResponseManagementResponse.ps1

<#
.SYNOPSIS
    Creates a new response management response.

.DESCRIPTION
    Creates a new response in the Genesys Cloud response management system.
    Uses the POST /api/v2/responsemanagement/responses endpoint.

.PARAMETER Body
    The response definition object containing name, library, texts, and other properties.

.EXAMPLE
    $respBody = @{ name = 'Greeting'; libraries = @(@{ id = 'lib-id' }); texts = @(@{ content = 'Hello!' }) }
    New-GCResponseManagementResponse -Body $respBody

.NOTES
    Genesys Cloud API: POST /api/v2/responsemanagement/responses
#>

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

    $endpoint = "responsemanagement/responses"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method POST -Body $Body
}