---
title: "Restore file"
method: POST
path: "/2/drive/{drive_id}/trash/{file_id}/restore"
tags: ["Drive > Files > Trash"]
---

# Restore file

`POST /2/drive/{drive_id}/trash/{file_id}/restore`

Restore a specific Directory or File from the trash

## Path parameters

- `drive_id` integer, required
- `file_id` integer, required

## Request body

- object
  - `destination_directory_id` integer, required — Destination directory identifier

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` union
    - 91ac10ffCancelResource
      - `cancel_id` string, required
      - `valid_until` integer, required
    - boolean

## Other responses

- `403` — Forbidden
- `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)
