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

# Batch : close sessions

`POST /3/drive/{drive_id}/upload/session/batch/finish`

Finish one or more upload session, verify and save the uploaded data to the kDrive.<br/>
<br/><note>
  The batch cannot exceed 1000 sessions.
</note>

## Path parameters

- `drive_id` integer, required

## Query parameters

- `with` string

## Request body

- object
  - `*` object, required
    - `created_at` integer — Override the creation date metadata of the new file.<note>The value of this field will be capped at 24h from the current time.</note>
    - `last_modified_at` integer — Override the update date metadata of the new file.<note>The value of this field will be capped at 24h from the current time.</note>
    - `token` string, required — xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx
    - `total_chunk_hash` string — The hash of the content of the file. If provided and the uploaded content does not match this hash, an error will be returned. For a multi-chunk upload use the hash of the concatenation of the chunk's hashes.<note>Supported hashing algorithm: md5, sha1, sha256, sha512, xxh3, xxh32, xxh64, xxh128</note>

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` 91ac10ffClosinguploadsession[] — unresolved $ref

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