---
title: "Get all folders (branded folders, unbranded folders and subfolders) in the Storage"
method: GET
path: "/epost/v2/archives/directories"
tags: ["ePost eArchive"]
---

# Get all folders (branded folders, unbranded folders and subfolders) in the Storage

`GET /epost/v2/archives/directories`

## Request

- Base URL: `https://api.klara.ch`
- URL: `https://api.klara.ch/epost/v2/archives/directories`
- Auth: one of:
  - API key in header `X-API-KEY`
  - HTTP bearer

## Response `200`

Retrieve folders successfully.

- Directory[]
  - `directoryId` string: Id of the directory. Empty for branded directory.
  - `directoryName` string: Name of the directory
  - `numberOfDocuments` integer: Number of documents in the directory
  - `parentDirectoryIds` string[]: The parent folder's IDs of the folder. Empty if the folder is in the root storage.
  - `hasSubDirectories` boolean: Flag indicating whether the folder has subdirectories.

## Other responses

- `401`: No Authorization header found or invalid token<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `404`: Resource not found<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `500`: Something went wrong on our side while processing the request. Please kindly contact our support.<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.

---

[API](https://skmtc.dev/klara/apis/klara-public-api.md) · [All operations](https://skmtc.dev/klara/apis/klara-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/klara/apis/klara-public-api/revisions/490b1a879fc2?raw)
