---
title: "Build archive"
method: POST
path: "/3/drive/{drive_id}/files/archives"
tags: ["Drive > Files > Archive"]
---

# Build archive

`POST /3/drive/{drive_id}/files/archives`

Build an archive from selected files. The archive can then be downloaded using the <a href="javascript:window.location = window.location.pathname.replace('post/3', 'get/2') + '/{archive_uuid}';">/2/drive/{drive_id}/files/archives/{archive_uuid}</a> route.
</br></br><note>
The file identifiers should be in the same parent directory.
</note>
</br><note>
The archive should contain at least one file and may not contain more than 20,000 files.
</note>

## Path parameters

- `drive_id` integer, required

## Request body

- object
  - `except_file_ids` integer[] — Array of files to exclude from the request; only used when parent_id is set, meaningless otherwise
  - `file_ids` integer[] — Array of files to include in the request; required without parent_id
  - `parent_id` integer — The directory containing the files to include in the request; required without file_ids

## Response `201`

Created

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` 91ac10ffUUIDResource
    - `uuid` string, required — Universally unique identifier of the resource `UUID Resource`

## 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/1c59d729611a/schema)
