RUT241 API /firmware/actions/upload_device_firmware

I am trying to write a small C#/.NET Core application which updates the RUT241.
Via Postman it worked flawlessly, but the multipart/form-data and file upload seems to be problematic. I get a 422 unprocessable-entity error.
Login and other API calls with Bearer key in the header work it is just the firmware which struggles me, can somebody provide an example script?
I already contacted Teltonika but got no response.
Update from RUT2M_R_00.07.11.2_WEBUI.bin to RUT2M_R_00.07.11.3_WEBUI.bin

Hi ms_kreisel,

I haven’t tested this on RUT241, but I use ssh to update devices, something like:

#!/bin/bash

# Replace the following with the actual names/credentials
FW_NAME="<fw_name.bin>"
ROUTER_IP="<ROUTER_IP>"
ROUTER_PASS="<ROUTER_PASS>"

echo "Upgrade the FW"
sshpass -p "$ROUTER_PASS" ssh -o "ServerAliveInterval 2" root@$ROUTER_IP "sysupgrade -n /tmp/$FW_NAME"
echo "Upgrade started"