We present a general abstract framework for combinatorial Dyson–Schwinger equations, in which combinatorial identities are lifted to explicit bijections of sets, and more generally equivalences of groupoids. Key features of combinatorial Dyson–Schwinger equations are revealed to follow from general categorical constructions and universal properties. Rather than beginning with an equation inside a given Hopf algebra and referring to given Hochschild 1-cocycles, our starting point is an abstract fixpoint equation in groupoids, shown canonically to generate all the algebraic structures. Precisely, for any finitary polynomial endofunctor P defined over groupoids, the system of combinatorial Dyson–Schwinger equations X = 1 + P(X) has a universal solution, namely the groupoid of P-trees. The isoclasses of P-trees generate naturally a Connes–Kreimer-like bialgebra, in which the abstract Dyson–Schwinger equation can be internalised in terms of canonical B+-operators. The solution to this equation is a series (the Green function), which always enjoys a Faà di Bruno formula, and hence generates a sub-bialgebra isomorphic to the Faà di Bruno bialgebra. Varying P yields different bialgebras, and cartesian natural transformations between various P yield bialgebra homomorphisms and sub-bialgebras, corresponding for example to truncation of Dyson–Schwinger equations. Finally, all constructions can be pushed inside the classical Connes–Kreimer Hopf algebra of trees by the operation of taking core of P-trees. A byproduct of the theory is an interpretation of combinatorial Green functions as inductive data types in the sense of Martin-Löf type theory (expounded elsewhere).