Public/Remove-GCAuthorizationRole.ps1

<#
.SYNOPSIS
    Deletes an authorization role.

.DESCRIPTION
    Removes the specified authorization role from Genesys Cloud.
    Uses the DELETE /api/v2/authorization/roles/{roleId} endpoint.

.PARAMETER RoleId
    The unique identifier of the role to delete.

.EXAMPLE
    Remove-GCAuthorizationRole -RoleId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'

.NOTES
    Genesys Cloud API: DELETE /api/v2/authorization/roles/{roleId}
#>

function Remove-GCAuthorizationRole {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$RoleId
    )

    $endpoint = "authorization/roles/$RoleId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method DELETE
}