---
title: "Upload a new document version (draft)"
method: POST
path: "/api/v1/companies/{companyId}/documents/{documentId}/versions/upload"
tags: ["Documents"]
---

# Upload a new document version (draft)

`POST /api/v1/companies/{companyId}/documents/{documentId}/versions/upload`

## Request

- Base URL: `https://comply.strac.io`
- URL: `https://comply.strac.io/api/v1/companies/{companyId}/documents/{documentId}/versions/upload`
- Auth: HTTP bearer

Uploads a new document version as a draft. Send the file base64-encoded (≤4 MB raw). Writes audit-log row `v1_upload_document`.

Role gate: owner / admin.

Scope: `documents:write`.

## Path parameters

- `companyId` string, required
- `documentId` string, required

## Request body

- object
  - `fileName` string, required: File name with extension (pdf/docx/xlsx/pptx/doc/xls/png/jpeg/gif/webp/csv/txt/md/json/zip).
  - `fileType` string, required: MIME type, e.g. application/pdf or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
  - `fileContent` string, required: Base64-encoded file bytes, ≤4 MB raw.
  - `comments` string: Optional changelog note.

## Response `200`

Upload a new document version (draft)

---

[API](https://skmtc.dev/strac/apis/strac-comply-api.md) - [All operations](https://skmtc.dev/strac/apis/strac-comply-api/llms.txt) - [OpenAPI document](https://skmtc.dev/strac/apis/strac-comply-api/revisions/d5558b64eeeb?raw)
