yes, I have done that in the past using JsAPI httpclientRequest ();the
one problem with that would be to make sure that you don't run into CORS
issue. Also to better assist you with question : why are you going to
pass the data to external API within workflow? what is your case
scenario so we can provide a better recommendations.