Skip to main content

Dashboard

Data retention

You can control which data is deleted from your organization’s records. It could be helpful if you have an inquiry from your users who’d like to delete all their records.

Disclaimer. It’s NOT recommended to use these methods to remove all data after each request is sent, as this may disrupt handling statuses and other features that depend on the request’s records.

Frequent deletion may also break some features like: group chats, reactions, threads, typing indicator, init conversation, and other features that may rely on message IDs. If the message is deleted, it may no longer be used to interact with them.

DELETE https://a.loopmessage.com/api/v1/account-data/

Request body

NameTypeDescription
data_typeStringOptional. Possible values: messages, webhooks, api_request_logs
delete_typeStringOptional. Possible values: ids, contact, older_than

JSON Examples

// Delete messages by ids
{
 "data_type": "messages",
 "delete_type": "ids",
 "ids": [
  "13938444-c26c-a9a1-9a55-eaabef014555"
 ]
}

// Delete wehooks history by age
{
  "data_type": "webhooks",
  "delete_type": "older_than",
  "older_than_hours": 48
}

// Delete all messages for the contact
{
  "data_type": "messages",
  "delete_type": "contact",
  "contact": "+1234567890"
}

Response

When you receive a 200 response code, it means your data deletion request has been accepted and queued. But it doesn’t mean that it has already been deleted. The deletion process may take from a few seconds to a few minutes.

Response {.tabset .tabset-fade}

tab 200: Accepted

{
 "success": true,
 "response": {
 "response": {
   "data_type": "messages",
   "delete_type": "older_than",
   "deleted_count": 1000
  }
 }
}

tab 400: Failed

{
    "code": 100,
    "success": false,
    "message": "error description",
}

Data types

NameTypeDescription
messagesStringYour message history. By default, it may store up to 6 months.
webhooksStringWebhooks history. By default, it may store up to 30 days.
api_reqest_logsStringAPI requests history. By default, it may store up to 14 days.

Delete types

NameTypeDescription
idsArrayYour requests IDs. You can pass max 10 items per each request.
older_than_hoursIntegerInteger value in hours. Delete data then older then this value. Min value 1.
contactStringContact phone number. Delete data for a specific contact.

Best practices

If you are storing the full request history on your end, we prefer to store as less of your data as possible.
However, we advise against being overly aggressive about privacy or data retention by deleting records every few minutes.
If data retention is a priority for you, we recommend a minimum retention period of two days before deletion. For a more conservative approach, we suggest deleting data older than 7–14 days.
Please remember that these records are stored solely for debugging purposes and are not shared with anyone other than your account.