API endpoint to import new repository?

Hi, I couldn’t find an API endpoint to create a new repository by importing existing code from another repo. You have this option in the web UI.