DELETE api/v1/sms/messages
The method will expire all advanced messages regardless of expiry date set in the original request. If the notify recipients option is set then the system will notify all recipients that the message has been expired and no longer viewable (Only for advanced messages). If the delete option is set and the account has the message deletion feature enabled, the contents of the standard and advanced messages will be deleted. The default search criteria will list all messages that have expired or all recipients have read the message the maximum number of times. An object listing the parameters for messages to be deleted.
Request Information
URI Parameters
None.
Body Parameters
MessageCriteriaName | Description | Type | Additional information |
---|---|---|---|
Destination |
Specifies the destination that the contents of the message will be deleted. |
string |
None. |
MessageIDs |
List of all the advanced message IDs that will be deleted. All other critiera will be ignored if this is present. |
Collection of globally unique identifier |
None. |
Range |
Search for messages for deletion within a given date range. |
DateRange |
None. |
StartDate |
Specifes the start date that search will begin in. The format is the following:[YYYY-MM-DDTHH:MM:SSZ] |
date |
None. |
FinishDate |
Specifies the finish data that the search will finish. The format is the following:[YYYY-MM-DDTHH:MM:SSZ] |
date |
None. |
Type |
Specifies the type of messages to search for to delete. |
MessageType |
None. |
Delete |
Determines if the contents of the message will be removed. The account must have the feature enabled for this to work. |
boolean |
None. |
NotifyRecipients |
Determines if the recipients of the messages that are being deleted will be notified of the action. Only applicable for advanced messages. |
boolean |
None. |
Reason |
Allows the user to provide a reason for message deletion. |
string |
None. |
Request Formats
application/json, text/json
{ "Destination": "sample string 1", "MessageIDs": [ "3fe81706-5e88-428d-a740-d001a3d3904a", "e02316d8-cfb6-4c7b-a22d-a3ebef5461e1" ], "Range": 0, "StartDate": "2024-12-22T09:59:10.7908798+00:00", "FinishDate": "2024-12-22T09:59:10.7908798+00:00", "Type": 0, "Delete": true, "NotifyRecipients": true, "Reason": "sample string 4" }
application/xml, text/xml
<MessageCriteria xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Destination>sample string 1</Destination> <MessageIDs> <guid>3fe81706-5e88-428d-a740-d001a3d3904a</guid> <guid>e02316d8-cfb6-4c7b-a22d-a3ebef5461e1</guid> </MessageIDs> <Range>TODAY</Range> <StartDate>2024-12-22T09:59:10.7908798+00:00</StartDate> <FinishDate>2024-12-22T09:59:10.7908798+00:00</FinishDate> <Type>BOTH</Type> <Delete>true</Delete> <NotifyRecipients>true</NotifyRecipients> <Reason>sample string 4</Reason> </MessageCriteria>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
ResponseOfMessageDeletionResponseName | Description | Type | Additional information |
---|---|---|---|
Error | Error |
None. |
|
ResponseData | ResponseDataOfMessageDeletionResponse |
None. |
Response Formats
application/json, text/json
{ "Error": { "ErrorCode": "sample string 1", "ErrorReason": "sample string 2" }, "ResponseData": { "Identification": { "UserId": "sample string 1" }, "Result": "sample string 1", "Detail": { "NoOfMessagesExpired": 1, "NoOfMessagesDeleted": 2, "NumberOfCreditsUsed": 3.1, "NumberOfCreditsRemaining": 4.1 } } }
application/xml, text/xml
<ResponseOfMessageDeletionResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Error> <ErrorCode>sample string 1</ErrorCode> <ErrorReason>sample string 2</ErrorReason> </Error> <ResponseData> <Result>sample string 1</Result> <Identification> <UserId>sample string 1</UserId> </Identification> <Detail> <NoOfMessagesExpired>1</NoOfMessagesExpired> <NoOfMessagesDeleted>2</NoOfMessagesDeleted> <NumberOfCreditsUsed>3.1</NumberOfCreditsUsed> <NumberOfCreditsRemaining>4.1</NumberOfCreditsRemaining> </Detail> </ResponseData> </ResponseOfMessageDeletionResponse>