Preferred way of creating a public route for a module

The API heavy lifting has been incorporated in FreePBX 15, I recommend you start with that and note the API resources linked in this recent announcement: