Add custom members-only API

I’m trying to add a custom API to the ghost server. Are there any resources available on how to do that? Unfortunately I haven’t been able to find out how to do this just by reverse engineering (or, in other words, having some kind of guidance would spare me a lot of time).

In my specific case I want to add an API which accepts POST requests and is only allowed for logged in members. If there’s no docs or similar available where in the code should I start looking around?