The signature of a path is a sequence of tensors which allows to uniquely reconstruct the path. By employing the geometric theory of nonlinear systems of ordinary differential equations, we find necessary and sufficient algebraic conditions on the signature tensors of a path to be a solution of a given system of ODEs. As an application, we describe in detail the systems of ODEs that describe the trajectories of a vector field, in particular a linear and Hamiltonian one.