Observations of the W40 cloud complex with the Cosmic Background Imager (CBI) at 31 GHz are presented. The data were taken over a span of two years (2006 - 2008). Data reduction and calibration was performed with the aid of the ``in-house'' software CBICAL.Three different types of calibration are applied to the data: quadrature, noise and antenna calibration. Difference mapping is used to extract flux from the visibilities. The final CLEANed combined map of W40 at 31 GHz after spillover rejection is presented. The synthesized beam is equal to 4.4$\times$3.8 arcmin and is limited by dynamic range of 321 to 1. It is found that the W40 region consists of a compact source of size 5.8 $\pm$ 0.2 arcmin. A low level extended ionised gas that connects W40 to the Galactic plane is also detected from inspection of low frequency ($\sim$ 1 GHz) radio surveys. The temperature of the source is 57 $\pm$ 4 K. The integrated flux density of W40 is 27.7$\pm$1.4 Jy at 31 GHz, as determined by CBI at 5 arcmin resolution. No evidence of extended emission is found. The spectrum of W40 is constrained by the values of its flux density as they were measured by the Effelsberg, WMAP, IRAS, and GB6 surveys at a frequency range between $\sim$ 1 to 5000 GHz. The flux densities are extracted by means of Gaussian fitting and aperture photometry. Gaussian fitting exhibits less sensitivity in its measurements under a variant background and therefore is considered a more robust method of measuring the flux density of W40. We find that a power law with an optically thin free-free spectrum ($\alpha=-0.12$) in combination with a modified blackbody curve with a thermal dust emissivity index ($\beta = 0.1 \pm 0.01$) can sufficiently describe the spectrum of W40. The value of the emissivity is flatter than expected implying that a multiple dust component is more suitable at higher frequencies. We also find that optically thick emission from ultra-compact HII regions is not expected to contribute to the spectrum of W40 using high resolution NVSS data.The upper limit of the flux density at 31 GHz was calculated to be 5 Jy with a 2$\sigma$ confidence level at 5 arcmin resolution. A tighter limit was derived at 9.4 arcmin, a value of 4.4 Jy. This value cannot account for any spinning dust emission. We interpret this absence as possible destruction of the population of the small grain sizes due to excess heat resulting from active star formation occurring inside the cloud complex. Conversely, for the WMAP data a small bump is observed and the upper limit at 33 GHz is 5.4 Jy with a 2$\sigma$ confidence level. This only qualifies as a noise fluctuation.