Create Ticket from Chat with Rest API

Create Ticket from Chat with Rest API

Hi to everyone, is possible to create a ticket from Chat with Rest API?
In user interface is possible by clicking on the button "Convert chat as a ticket".
Anyone know how to do that?
Thanks