---
title: "Undo action"
method: POST
path: "/2/drive/{drive_id}/cancel"
tags: ["Drive > Files > Action"]
---

# Undo action

`POST /2/drive/{drive_id}/cancel`

Cancel an action with a token or cancel actions with tokens.
An action token is a token returned with a CancelResource.
Used in bulk processes or specific actions like renaming a file.

## Path parameters

- `drive_id` integer, required

## Request body

- object
  - `cancel_id` string — The cancel identifier
  - `cancel_ids` string[] — The cancel identifiers

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` union
    - 91ac10ffUUIDFeedbackresource
      - `id` string, required — Identifier
      - `result` boolean, required — Result of the asking query
      - `message` string — Message, additional information usually given when the result is false
    - 91ac10ffUUIDFeedbackresource[]
      - `id` string, required — Identifier
      - `result` boolean, required — Result of the asking query
      - `message` string — Message, additional information usually given when the result is false

## Other responses

- `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)
