updated api endpoint to preact