Hi Anu,
to save the changes back to the CMS, you need to update the state of the document,
if you do the following:
PUT .../raylight/v1/documents/<docID>
without any request body, it will save the document with changes
if you use:
PUT .../raylight/v1/documents/<docID>
with the following body:
<document>
<state>Unused</state>
</document>
It will save the document to the CMS and close it as well.
See this page in the documentation
Dan