Update data retention

You can set the retention time of your data, meaning the time during which it is stored on our servers. Past that time, it will be deleted. Each value corresponds to the data retention period. Except for contact lists, where the value corresponds to the period of inactivity before deletion. A list is inactive if it is not modfied or used to create a campaign.

PUT

/retention

Body Parameters

message The data retention time of your messages
list The time of inactivity of your lists
survey The data retention time of your surveys
campaign The data retention time of your campaigns
mo The data retention time of your responses
lookup The data retention time of your HLR Lookup

Examples


PUT /retention HTTP/1.1
Host: api.smsfactor.com
Authorization: Bearer your.token
Accept: application/json

{
  "retention":{
    "message": "2d",
    "survey": "5m",
    "list": "2m",
    "campaign": "5m",
    "mo": "5m",
    "lookup": "5m"
  }
}
          
        

PUT /retention HTTP/1.1
Host: api.smsfactor.com
Authorization: Bearer your.token
Accept: application/xml

<?xml version="1.0" encoding="UTF-8"?>
  <retention>
    <message>2d</message>
    <survey>5m</survey>
    <list>2m</list>
    <campaign>5m</campaign>
    <mo>1m</mo>
    <campaign>1m</campaign>
    <lookup>1m</lookup>
  </retention>
        
      

Maximum value

Resource Maximum value
message 6 months ( 6m )
survey 26 months ( 26m )
list 14 months of inactivity ( 14m )
campaign 26 months ( 26m )
lookup 14 months ( 26m )
mo 6 months ( 6m )

Result Format


{
    "status": 1,
    "message": "OK",
    "retention": {
        "message": "2d",
        "survey": "5m",
        "list": "2m",
        "lookup": "1m",
        "mo": "1m",
        "campaign": "5m"
    }
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>1</status>
  <message>OK</message>
  <retention>
    <message>2d</message>
    <survey>5m</survey>
    <list>2m</list>
    <campaign>5m</campaign>
    <mo>1m</mo>
    <lookup>1m</lookup>
  </retention>