---
title: "Batch : cancel sessions"
method: DELETE
path: "/3/drive/{drive_id}/upload/session/batch"
tags: ["Drive > Files > File/Directory > Upload > Session"]
---

# Batch : cancel sessions

`DELETE /3/drive/{drive_id}/upload/session/batch`

Cancel multiple session tokens. If you want to stop the upload and close one or more sessions to explicitly erase file(s)/upload(s).
<br/><br/><note>
When a session is started, it can be used for a maximum of 4 hours. It will be automatically canceled afterwards.
</note>
<br/><note>
  The batch cannot exceed 1,000 sessions.
</note>

## Path parameters

- `drive_id` integer, required

## Query parameters

- `tokens` string[], required

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` 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
- `429` — Response
- `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)
