The production of W±Z events in proton--proton collisions at a centre-of-mass energy of 13 TeV is measured with the ATLAS detector at the LHC. The collected data correspond to an integrated luminosity of 3.2 fb−1 . The W±Z candidates are reconstructed using leptonic decays of the gauge bosons into electrons or muons. The measured inclusive cross section in the detector fiducial region for leptonic decay modes is σ(W±Z→ℓ′νℓℓfid.)=63.2±3.2(stat.)±2.6(sys.)±1.5(lumi.) fb. In comparison, the next-to-leading-order Standard Model prediction is 53.4-2.8+3.6 fb. The extrapolation of the measurement from the fiducial to the total phase space yields σ(W±Ztot.)=50.6±2.6(stat.)±2.0(sys.)±0.9(th.)±1.2(lumi.) pb, in agreement with a recent next-to-next-to-leading-order calculation of 48.2-1.0+1.1 pb. The cross section as a function of jet multiplicity is also measured, together with the charge-dependent W+Z and W−Z cross sections and their ratio. Uses SM neutrino-lepton flavour matching and a resonant shape algorithm assuming the Standard Model, to match the MC-based correction to the fiducial region applied in the paper. This routine is therefore only valid under the assumption of the Standard Model and cannot be used for BSM reinterpretation.