Update retention policy REST API
PUT
/api/sites/{id}/retention
const url = 'https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/retention';const options = { method: 'PUT', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"days":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/retention \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "days": 1 }'Updates per-site retention days.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
days
required
integer
Examplegenerated
{ "days": 1}Responses
Section titled “Responses”Updated