Upload Files to API via Server Connect

Hello,

How can I create a form to upload a file directly to a third-party through its API?

I need to send a file using the POST method as described below:

curl --request POST \ 
  --url 'https://www.externalwebsite' \
  --form 'apikey=<apikey>' \
  --form 'file=@/path/to/file'

Thank you