Skip to main content
Version: 5.11.8

DeleteSentMessage

public BackendReturnObject DeleteSentMessage(string messageIndate);

Parameter

ValueTypeDescription
messageIndatestringindate of the sent message to delete

Description

Deletes a message from the list of sent messages.
Even if a sent message is deleted, the recipient's list of received messages is preserved.

Example

Synchronous

//Get the inDate of the message to delete.  
BackendReturnObject bro = Backend.Message.GetSentMessageList();
string messageIndate = bro.Rows()[0]["inDate"]["S"].ToString();

Backend.Message.DeleteSentMessage(messageIndate);

Asynchronous

//Get the inDate of the message to delete.  
Backend.Message.GetSentMessageList(callback =>
{
string messageIndate = callback.Rows()[0]["inDate"]["S"].ToString();

Backend.Message.DeleteSentMessage(messageIndate, callback2 =>
{
//Post-process
});

});

SendQueue

//Get the inDate of the message to delete.  
SendQueue.Enqueue(Backend.Message.GetSentMessageList, callback =>
{
string messageIndate = callback.Rows()[0]["inDate"]["S"].ToString();

SendQueue.Enqueue(Backend.Message.DeleteSentMessage, messageIndate, callback2 =>
{
// Post-process
});

});

Return cases

Success cases

When the deletion is successful
statusCode : 204

Error cases

When there is no message for the corresponding messageIndate
statusCode : 404
errorCode : NotFoundException