> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Storage Tiering

> Set the tiering override on a namespace or collection: turn it on or off, choose the idle windows, or exempt the data with a reason

Mixpeek demotes idle data to cheaper storage on a schedule. The platform declares the default windows per data class. A namespace can override them, and a collection can override its namespace. Any part you leave unset inherits from the level above.

## The `tiering` field

Namespaces and collections take the same `tiering` object on create and on update (`PATCH /v1/namespaces/{namespace_id}`, `PATCH /v1/collections/{collection_id}`).

| Field | Type | What it does |
| - | - | - |
| `enabled` | boolean | Turn tiering on or off here. Unset inherits from above. |
| `idle_days.cold` | integer, at least 1 | Days without a use before the cold tier. |
| `idle_days.frozen` | integer, more than `cold` | Days without a use before the frozen tier. |
| `exempt` | string | Opt out, with the reason (for example a legal hold). An exempt namespace or collection is never demoted. An empty reason is refused. |

## Examples

Keep a collection hot for 90 days and frozen after a year:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.mixpeek.com/v1/collections/$COLLECTION_ID \
    -H "Authorization: Bearer $API_KEY" \
    -H "X-Namespace: $NAMESPACE_ID" \
    -H "Content-Type: application/json" \
    -d '{"tiering": {"idle_days": {"cold": 90, "frozen": 365}}}'
  ```

  ```python Python theme={null}
  client.collections.update(
      collection_id=COLLECTION_ID,
      tiering={"idle_days": {"cold": 90, "frozen": 365}},
  )
  ```

  ```javascript JavaScript theme={null}
  await client.collections.update(COLLECTION_ID, {
    tiering: { idle_days: { cold: 90, frozen: 365 } },
  });
  ```
</CodeGroup>

Exempt a namespace under a legal hold:

```bash theme={null}
curl -X PATCH https://api.mixpeek.com/v1/namespaces/$NAMESPACE_ID \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tiering": {"exempt": "legal hold, matter 2026-014"}}'
```

The older collection field `tiering_rules` is retired. It is returned on reads so existing records still parse; a write that sets it is refused. Use `tiering`.

## Related

* [Collection Lifecycle](/docs/vector-store/collection-lifecycle) for moving a whole collection between index tiers by hand
* [Storage Format](/docs/vector-store/storage-format) for what each tier stores


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.