InstaMSg will only store a message if the message retain flag is set to 0 when publishing from a Client library or when the save flag is set to true when publishing using the Publish Message REST API . Messages are stored for 30 days, after which they are automatically deleted from InstaMsg. You can retrieve the historical messages by using the List Messages REST API.