Add an API endpoint for the route