Accordion event on collapse, uncollapse

is there any functionality to detect when an accordion item is collapsed or uncollapsed?

I can’t find an event corresponding to this.

You may try to use the onActive/onBeforeActive event:
docs.dhtmlx.com/api__dhtmlxacco … event.html
docs.dhtmlx.com/api__dhtmlxacco … event.html