---
title: "Initiate chunked upload · Documents · COUNT Partner API"
description: "Starts a chunked upload session for a large file. POST /partners/documents/chunk-upload/initiate"
canonical: "https://developers.getcount.com/reference/documents/chunk-upload-initiate"
source: "https://developers.getcount.com/reference/documents/chunk-upload-initiate"
---
[Documents](https://developers.getcount.com/reference/documents) / Initiate chunked upload

# Initiate chunked upload

POST `/partners/documents/chunk-upload/initiate`

Starts a chunked upload session for a large file.

HMAC signature + Bearer access token

[Try this request](https://developers.getcount.com/tools/try-it?method=POST&path=%2Fpartners%2Fdocuments%2Fchunk-upload%2Finitiate&body=%7B%0A++%22fileName%22%3A+%22contract-acme-2026.pdf%22%2C%0A++%22folderPath%22%3A+%22Contracts%22%2C%0A++%22fileSize%22%3A+5242880%2C%0A++%22chunkSizeInMB%22%3A+5%0A%7D)

[Customers API](https://developers.getcount.com/reference/customers) [Projects API](https://developers.getcount.com/reference/projects)

#### Request body

`fileName` string required

Original file name.

`folderPath` string required

Destination folder path.

`fileSize` integer required

Total file size in bytes.

`chunkSizeInMB` integer

Chunk size in megabytes.

#### Responses

`200` Returns uploadProgressId and chunk configuration.

`401` Missing or invalid HMAC signature, expired timestamp, or invalid Bearer token. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-401)

`403` The credential does not have access to this workspace or resource. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-403)

`429` Rate limit exceeded (100 requests per minute per clientId). Retry after the Retry-After header. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-429)

[Previous DELETE Delete document](https://developers.getcount.com/reference/documents/delete-document) [Next POST Upload chunk](https://developers.getcount.com/reference/documents/chunk-upload-chunk)

POST `https://api.getcount.com/partners/documents/chunk-upload/initiate`

Request

```javascript
import crypto from 'node:crypto';

const BASE_URL = 'https://api.getcount.com';
const CLIENT_ID = process.env.COUNT_CLIENT_ID;
const CLIENT_SECRET = process.env.COUNT_CLIENT_SECRET;
const ACCESS_TOKEN = process.env.COUNT_ACCESS_TOKEN;

const method = 'POST';
const signingPath = '/documents/chunk-upload/initiate';
const timestamp = Math.floor(Date.now() / 1000).toString();
const body = {
  "fileName": "contract-acme-2026.pdf",
  "folderPath": "Contracts",
  "fileSize": 5242880,
  "chunkSizeInMB": 5
};
const bodyString = JSON.stringify(body);

const bodyHash = crypto.createHash('sha256').update(bodyString).digest('hex');
const baseString = `${method}:${signingPath}:${timestamp}:${bodyHash}`;
const signature = crypto.createHmac('sha256', CLIENT_SECRET).update(baseString).digest('hex');

const response = await fetch(`${BASE_URL}/partners/documents/chunk-upload/initiate`, {
  method,
  headers: {
    'x-client-id': CLIENT_ID,
    'x-timestamp': timestamp,
    'x-signature': signature,
    'Content-Type': 'application/json',
    Authorization: `Bearer ${ACCESS_TOKEN}`,
  },
  body: bodyString,
});

console.log(await response.json());
```

Response · 200

```json
{
  "status": "success",
  "data": {
    "uploadProgressId": "upload-progress-uuid",
    "chunkSizeInBytes": 5242880,
    "totalChunks": 1
  }
}
```
