Hi Nikhil, feel free to move your question to the Genesys Developer community where it will definitely get more traction.
In the meantime and just because you are already here, have you tried:
GET /api/v2/webchat/guest/conversations/{conversationId}/messages
This endpoint allows you to retrieve message history for a specific chat conversation and/or Access historical messages using the conversation ID.
Consider that this API follows RESTful principles.
If this helps, dont forget to flag as "best anwser" :-)
------------------------------
Joaquin Garcia Fink
Senior Customer Success Manager
Genesys - Employees
------------------------------