---
title: "Retention policy | Customer&#x27;s Canvas Hub"
canonical: "https://customerscanvas.com/docs/hub/dev-center/api/asset-storage/retention-policy/"
---

# Retention policy

> To clean up storage, a [retention policy](https://customerscanvas.com/docs/hub/dev-center/concepts/retention-policy.md) was implemented in BackOffice.

## Asset retention

Once a day, a background task that finds and deletes outdated assets for all tenants with `EnableAssetsRetention` set to `true` is performed on the backend. You can get this value for your tenant with the endpoint [`GET /api/storage/v1/tenants`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/tenants/Get).

When creating a tenant, the value of the retention policy can be set to:
- Unknown
- Never
- Default

Assets are considered outdated if both of the following conditions are met:

- `RetentionPolicy` is set to `Default`.
- `LastAccessTime` is earlier than the `AssetsRetentionPeriodInDays` defined in the tenant settings.

The default value of `AssetsRetentionPeriodInDays` is set to `60` days. If `AssetsRetentionPeriodInDays` is `0`, no cleanup is performed for the tenant.

## Changing the retention period

To change retention period of an already created tenant, use the endpoint [`PUT /api/storage/v1/tenants/{id}`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/tenants/Update).

```bash
PUT /api/storage/v1/tenants/{id}
{
  "settings": {
    "enableAssetsRetention": true,
    "assetsRetentionPeriodInDays": 1
  }
}
```

## Storing private assets

You may want to store a private asset, for example, a private design permanent by changing its retention policy to `Never` using the endpoint [`POST /api/storage/v1/private-designs/{id}/retention-policy`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/privatedesigns/SetRetentionPolicy).

```bash
POST /api/storage/v1/private-designs/{id}/retention-policy[?policy&tenantId&ownerId]
{
    "policy": "Never"
}
```

## Triggering the cleanup process

To manually trigger the cleanup, use the endpoint [`POST /api/storage/v1/tenants/{id}/clean-up`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/tenants/CleanUp).

```bash
POST ​/api​/storage​/v1​/tenants​/{id}​/clean-up
```

***

**Further Reading**

- Learn how to [arranging designs in folders](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage/arranging-designs.md).
- Explore how to [get a design list](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage/getting-design-list.md) using this API.
- Dive into [Asset Storage API](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md) reference.
