How do I customize textpopup link button?

Hi,
I want to customize textpopup linksubmit button to call some API and save the link data.

Is there a way to achieve that? Thanks in advance