We develop a systematic framework to compute the conformal partial wave
expansions (CPWEs) of tree-level four-point Witten diagrams with totally
symmetric external fields of arbitrary mass and integer spin in AdSd+1.
Employing this framework, we determine the CPWE of a generic exchange Witten
diagram with spinning exchanged field. As an intermediate step, we diagonalise
the linear map between spinning three-point conformal structures and spinning
cubic couplings in AdS. As a concrete application, we compute all exchange
diagrams in the type A higher-spin gauge theory on AdSd+1, which is
conjectured to be dual to the free scalar O(N) model. Given a
CFTd, our results provide the complete holographic reconstruction of all
cubic couplings involving totally symmetric fields in the putative dual theory
on AdSd+1.Comment: 41 pages, many figures. v2: Three self-contained pages removed from
section 4, to be restored elsewhere. Main results unaffected. Refs added and
typos fixe