If you need to convert text from one markup format into another, Pandoc is your swiss-army knife.
pandoc-as-a-service allows you to do it online via friendly HTTP API.
pandoc-as-a-service has a simple to use HTTP API.
POST a data to https://pandoc.bilimedtech.com/:format
curl -H "Content-Type: text/{{inputFormat}}" -X POST -d "%DATA%" https://pandoc.bilimedtech.com/{{outputFormat}}