The interest for networks of dynamical systems has been increasing in the past years, especially because of their capability of modeling and describing a large variety of phenomena and behaviors. We propose a technique, based on Wiener filtering, which provides general theoretical guarantees for the detection of links in a network of dynamical systems. For a large class of network that we name self-kin sufficient conditions for a correct detection of a link are formulated. For networks not belonging to this class we give conditions for correct detection of links belonging to the smallest self-kin network containing the actual one.