api.js : Add postmessage api [added for supporting post-hock grading.]

[#50760109]

https://www.pivotaltracker.com/story/show/50760109