Skip to main content

Deleting Messages

Deleting inbox messages

The DELETE /v3/safemail/inbox endpoint is used to delete SafeMail inbox messages before their auto-deletion dates.

DELETE /v3/safemail?fromDate=2020-01-01&toDate=2024-01-01
Authorization: Basic ${ base64(apiKey + ':' + secretKey) }
ParameterRequiredDescription
fromDateNoA date in 'yyyy-MM-dd' format of which all SafeMail inbox messages after will be deleted.
toDateNoA date in 'yyyy-MM-dd' format of which all SafeMail inbox messages before will be deleted.

Omitting both fromDate and toDate parameters will result in ALL SafeMail messages being deleted.

Response example:

HTTP/2.0 204 No Content
""

To delete a SafeMail inbox message with a specific ID, the following can be used:

DELETE /v3/safemail/inbox/{id}
Authorization: Basic ${ base64(apiKey + ':' + secretKey) }

Deleting outbox messages

The DELETE /v3/safemail/outbox endpoint is used to delete SafeMail outbox messages before their auto-deletion dates.

DELETE /v3/safemail?fromDate=2020-01-01&toDate=2024-01-01
Authorization: Basic ${ base64(apiKey + ':' + secretKey) }
ParameterRequiredDescription
fromDateNoA date in 'yyyy-MM-dd' format of which all SafeMail outbox messages after will be deleted.
toDateNoA date in 'yyyy-MM-dd' format of which all SafeMail outbox messages before will be deleted.

Omitting both fromDate and toDate parameters will result in ALL SafeMail messages being deleted.

Response example:

HTTP/2.0 204 No Content
""

To delete a SafeMail outbox message with a specific ID, the following can be used:

DELETE /v3/safemail/outbox/{id}
Authorization: Basic ${ base64(apiKey + ':' + secretKey) }