Added a configurable endpoint constructor param for custom API endpoints