I have used the npm API before and it worked.
However, now it seems to be broken. The http request / curl just throws out the standard 'npm --help' output irrespective of the command passed. If I pass an invalid command, then it gives the error with the supported commands.
I used the following smartdocs