Javascript API calls to Duo

Hi all, would anyone have an example of a Rest API call to Duo made from Javascript?