HNR Tech Interview Question

Why and How to Secure API Endpoint?