---
title: "Update trash settings"
method: PUT
path: "/2/drive/{drive_id}/settings/trash"
tags: ["Drive > Settings"]
---

# Update trash settings

`PUT /2/drive/{drive_id}/settings/trash`

Update the trash settings, including the retention period of trashed files

## Path parameters

- `drive_id` integer, required

## Request body

- object
  - `max_duration` integer, required — Number of days to keep file in trash. <note>The unit is in days, and the available values depend on your offer.</note> check <strong>pack.limit.trash.options</strong>: <a href="/docs/api/get/2/drive/%7Bdrive_id%7D">/drive/{drive_id}</a>

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` boolean

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
