---
title: "Build archive"
method: POST
path: "/2/app/{drive_id}/share/{sharelink_uuid}/archive"
tags: ["Drive > Files > Share link > Archive"]
---

# Build archive

`POST /2/app/{drive_id}/share/{sharelink_uuid}/archive`

Build an archive from files in the share link. The archive can then be downloaded using the <a href="/docs/api/get/2/drive/{drive_id}/share/{sharelink_uuid}/download">drive/{drive_id}/share/{sharelink_uuid}/download</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
- `sharelink_uuid` 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` 91ac10ffArchiveResource — unresolved $ref

## Other responses

- `400` — Bad Request
- `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/158a854b0c7d/schema)
