I created an API app for MS Azure, but it runs on url like: https://microsoft-apiapped89163604714d21b7e4a3424ed82d50.azurewebsites.net/...
Can I switch it to my own domain name somehow?
You can, but unfortunately there is currently a limitation that will prevent the API App from working properly. There is a list of known limitations and issue which you can find here. The fix will be available quite soon but I don't have a specific ETA to share.
Once this is fixed, you can customize the domain by:
Effectively, once you're done with Step 2, you can follow the guide of Customizing the domain of a Web App, as both API Apps and Web Apps share the same underlying infrastructure. The guide is available here
Hope it helps.