57Fe Mossbauer spectroscopy measurements are presented in the underdoped Ba(Fe{1-x}Cox)2As2 series for x=0.014 (T_c < 1.4K) and x=0.03 and 0.045 (T_c ~ 2 and 12K respectively). The spectral shapes in the so-called spin-density wave (SDW) phase are interpreted in terms of incommensurate modulation of the magnetic structure, and allow the shape of the modulation to be determined. In undoped BaFe2As2, the magnetic structure is commensurate, and we find that incommensurability is present at the lowest doping level (x=0.014). As Co doping increases, the low temperature modulation progressively loses its squaredness and tends to a sine-wave. The same trend occurs for a given doping level, as temperature increases. We find that a magnetic hyperfine component persists far above the SDW transition, its intensity being progressively tranferred to a paramagnetic component on heating.