The "level" object attribute for IAccessible2 to specify the level of a heading is both mentioned in the Core Accessibility API Mappings specification and in the IAccessible2::groupPosition documentation.
Quoting from the latter (emphasis added):
This method is meant to describe the nature of an object's containment
structure. It's exposed by trees, tree grids, nested lists, nested
menus, but not headings, which uses the level object attribute.
However, the "level" object attribute for headings is currently not documented in the object attributes specification and should therefore be added (either explicitly, or alternatively by mentioning that the attributes as specified in the above-mentioned ARIA Core Accessibility API Mapping specification apply in general, if that's the case).
The spec does mention the "level" attribute for lists, but not for headings.
Being able to document this attribute might depend on issue #24 / PR #27.
Related issue/PR for NVDA:
nvaccess/nvda#15881
nvaccess/nvda#15882