How to keep chat context alive via API?

Please see this