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.
PUT
/retention
Body Parameters
message | The data retention time of your messages |
list | The data retention time of your lists (-1 for endless expiration) |
survey | The data retention time of your surveys |
campaign | The data retention time of your campaigns |
After your number put a 'd' for day and a 'm' for month |
Examples
PUT /retention HTTP/1.1
Host: api.smsup.ch
Authorization: Bearer your.token
Accept: application/json
{
"retention":{
"message": "2d",
"survey": "5m",
"list": "2m",
"campaign": "5m"
}
}
PUT /retention HTTP/1.1
Host: api.smsup.ch
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>
</retention>
Maximum value
Message | 6 months ( 6m ) |
Survey | 26 months ( 26m ) |
List | 26 months / no expiration ( 26m / -1 ) |
Campaign | 26 months ( 26m ) |
Result Format
{
"status": 1,
"message": "OK",
"retention": {
"message": "2d",
"survey": "5m",
"list": "2m",
"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>
</retention>