Twilio interview question

Hit API and return desired output