preopend endopoints with api