---
title: "Start many file uploads"
description: "Opens an upload for each of up to 50 files in one call."
canonical_url: https://docs.markdrop.in/api/files/start-many-file-uploads
last_updated: 2026-11-20
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Start many file uploads

`POST https://api.markdrop.in/api/v1/files/uploads/batch`

Opens an upload for each of up to 50 files in one call. Each file is checked on its own, exactly as [Start a file upload](https://docs.markdrop.in/api/files/start-a-file-upload): a file that can't be uploaded comes back with `ok: false`, its `error` and `status`, and the others are opened. With `short_links: true` every part also gets a `short_url` ([upload one part](https://docs.markdrop.in/api/files/upload-one-part-to-a-short-upload-link)). `resumed: true` means an open upload for the same file was handed back: ask [Check an upload](https://docs.markdrop.in/api/files/check-an-upload) which parts it already holds.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 10 per minute per IP address.
- **CLI:** `markdrop upload ./exports --workspace Acme --folder sales/q3`
- **MCP tool:** `create_uploads` ([tools](https://docs.markdrop.in/ai/tools))

## Request body

`application/json`, required.

- `files` (array of object, required): 1–50 items.
  - `file_name` (string, required): The file's name, with its extension. 1–255 characters.
  - `size_bytes` (integer, required): The file's exact size in bytes. At least 1.
  - `content_type` (string): Up to 255 characters. Default `""`.
  - `sha256` (string, required): The SHA-256 of the whole file, in hex. The server checks it before the file goes live. Matches `^[0-9a-fA-F]{64}$`.
  - `target_slug` (string): Replace the file behind this existing address instead of publishing a new one. The link, access and views stay. Matches `^[A-Za-z0-9_-]{1,64}$`.
  - `title` (string): Shown on the page and in link previews. Up to 200 characters.
  - `access` ("link" | "private" | "password" | "workspace"): Who can open it: `link`, `private`, `password` (needs `password`) or `workspace` (needs `workspace`).
  - `password` (string): 1–100 characters.
  - `workspace` (string): File it in this workspace: the workspace's id. 1–64 characters.
  - `folder` (string): An existing folder of `workspace`: its id or its path, like `guides/setup`. 1–400 characters.
  - `slug` (string): Your own address: `markdrop.in/<slug>`. 3–50 characters. Matches `^[a-zA-Z0-9_-]+$`.
- `short_links` (boolean): Default `false`.

## Responses

- `200`: OK.
  - `uploads` (array of object)
    - `index` (integer)
    - `ok` (boolean)
    - `file_name` (string)
    - `upload_id` (string | null)
    - `part_size` (integer | null)
    - `part_count` (integer | null)
    - `parts` (array of object | null)
    - `expires_at` (string (date-time) | null): ISO 8601, for example `2026-11-30T12:00:00Z`.
    - `resumed` (boolean): Default `false`.
    - `error` (string | null)
    - `status` (integer | null)
- `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 POST https://api.markdrop.in/api/v1/files/uploads/batch \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
       "files": [
         {
           "file_name": "deck.pdf",
           "size_bytes": 1048576,
           "sha256": "SHA256_OF_THE_FILE"
         },
         {
           "file_name": "notes.pdf",
           "size_bytes": 20480,
           "sha256": "SHA256_OF_THE_FILE",
           "access": "private"
         }
       ],
       "short_links": true
     }'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/files/uploads/batch", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "files": [
      {
        "file_name": "deck.pdf",
        "size_bytes": 1048576,
        "sha256": "SHA256_OF_THE_FILE"
      },
      {
        "file_name": "notes.pdf",
        "size_bytes": 20480,
        "sha256": "SHA256_OF_THE_FILE",
        "access": "private"
      }
    ],
    "short_links": true
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/files/uploads/batch",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={
        "files": [
            {
                "file_name": "deck.pdf",
                "size_bytes": 1048576,
                "sha256": "SHA256_OF_THE_FILE",
            },
            {
                "file_name": "notes.pdf",
                "size_bytes": 20480,
                "sha256": "SHA256_OF_THE_FILE",
                "access": "private",
            },
        ],
        "short_links": True,
    },
)
r.raise_for_status()
print(r.json())
```

**CLI**

```bash
markdrop upload ./exports --workspace Acme --folder sales/q3
```
