soc/api/v1/registry/New-RegistrySetting.ps1

function New-RegistrySetting
{
    [CmdletBinding(SupportsShouldProcess)]
    param(
        [Parameter(Mandatory)]
        [string] $SettingName,
        [Parameter(Mandatory)]
        [string] $SettingValue,
        [string] $IsEncrypted = $false
    )
    
    if ($PSCmdlet.ShouldProcess($SettingName))
    {
        return Invoke-Api Post "/soc/api/v1/registry" -JsonBody @{
            "name" = $SettingName
            "value" = $SettingValue
            "isEncrypted" = $IsEncrypted
        }
    }
}