Adding API handler