The API route doesn't render a template. It just outputs the JSON that is passed into render.
You can test this by prepending /api on any route, you'll see JSON output.
The purpose of this is for the AJAX loading of the next page.
As the topic says:
ErrorCommand failed: npm install email@example.com /bin/sh: 1: npm: not found
What can I do? This happens when clicking on the install button under find plugins.
Please contact your host about installing npm (unless you can do it yourself)