updated api endpoint to use preact.io