When incorporated in quantum sensing protocols, quantum error correction can be used to correct for high frequency noise, as the correction procedure does not depend on the actual shape of the noise spectrum. As such, it provides a powerful way to complement usual refocusing techniques. Relaxation imposes a fundamental limit on the sensitivity of state of the art quantum sensors which cannot be overcome by dynamical decoupling. The only way to overcome this is to utilize quantum error correcting codes. We present a superconducting magnetometry design that incorporates approximate quantum error correction, in which the signal is generated by a two qubit Hamiltonian term. This two-qubit term is provided by the dynamics of a tunable coupler between two transmon qubits. For fast enough correction, it is possible to lengthen the coherence time of the device beyond the relaxation limit.