---
title: "Share a folder"
description: "Creates a link to a folder."
canonical_url: https://docs.markdrop.in/api/folders/share-a-folder
last_updated: 2026-10-30
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Share a folder

`PUT https://api.markdrop.in/api/v1/workspaces/{workspace_id}/folders/{folder_id}/share`

Creates a link to a folder. Each visitor sees only the documents they could already open: sharing a folder never changes any document's access. `hidden` lists what the link's audience can't see.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 60 per minute per IP address.
- **Guide:** [Share a folder](https://docs.markdrop.in/workspaces/share-a-folder)

## Path parameters

- `workspace_id` (string, required): The workspace's id, from the address of its settings page (`markdrop.in/settings/workspaces/<workspace-id>`) or from [List workspaces](https://docs.markdrop.in/api/workspaces/list-workspaces).
- `folder_id` (string, required): The folder's id, from [List folders](https://docs.markdrop.in/api/folders/list-folders).

## Request body

`application/json`, required.

- `level` ("link" | "workspace", required): `link`: anyone with the folder link; `workspace`: members only. Each visitor still sees only the documents they could already open.

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X PUT https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/folders/FOLDER_ID/share \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"level":"link"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/folders/FOLDER_ID/share", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "level": "link"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.put(
    "https://api.markdrop.in/api/v1/workspaces/WORKSPACE_ID/folders/FOLDER_ID/share",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"level": "link"},
)
r.raise_for_status()
print(r.json())
```
