How to insert-cell with content in a nbextension

I’m making a custom nbextension for jupyter, i have my dialog and some interaction with the user all working nicely. Now, based on that interaction, i want to add a cell to the notebook with specific content.

I’m assuming its an action in Jupyter.notebook somewhere but couldn’t find it, nor any documentation for it.

Any help will be much appreciated!

thank you