Current scenario we have is,
We get automated SMS messages to our Bot account from which we read the code from. At the moment we believe we will be receiving messages from a single phone number so we are hardcoding SMS sessionId and reading latest message based on passing timestamp to and from values.
This one phone number scenario might change in near future as per new accounts being added to automated subscriptions and in that case it would not be feasible for us to loop through all the messages and understand the mapping of phone number to account on our end and read latest message.
As a work around, we are hoping to request an DELETE API call so whenever we read an SMS message, we would like to delete that message from our bot account along with session containing that message so we keep the message Inbox clear of any messages but incoming new messages.
This would help us greatly as we do not have to loop through the previous read messages and saves our process additional time and resources.
Thank you in advance for considering the request. Please keep us posted on the timeline if the request is considered.