Public/New-GCTaskManagementWorktype.ps1

<#
.SYNOPSIS
    Creates a new task management work type.

.DESCRIPTION
    Creates a new work type in Genesys Cloud task management.
    Uses the POST /api/v2/taskmanagement/worktypes endpoint.

.PARAMETER Body
    The work type definition object.

.EXAMPLE
    $wtBody = @{ name = 'Customer Request'; divisionId = 'div-id' }
    New-GCTaskManagementWorktype -Body $wtBody

.NOTES
    Genesys Cloud API: POST /api/v2/taskmanagement/worktypes
#>

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

    $endpoint = "taskmanagement/worktypes"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method POST -Body $Body
}