setup router as endpoint wirelessly

if i understand correctly, both endpoints and coordinators act as routers

The XBee 802.15.4 modules that it sounds like you are working with Do not support a Mesh network. They are a Peer to peer, point to point, point to multi-point product only.