---
title: "Create document upload request"
method: POST
path: "/v1/documents"
tags: ["Documents"]
---

# Create document upload request

`POST /v1/documents`

Create an upload request for a document. Returns a signed URL for direct upload to storage.

## Headers

- `X-API-Key` string

## Request body

- CreateDocumentDto
  - `documentType` string, required — Type of document
  - `documentSubtype` string — Specific document subtype
  - `fileName` string, required — Original file name
  - `contentType` string, required — MIME type of the file
  - `customerId` string, required — Customer ID the document belongs to
  - `transferId` string — Transfer ID if document is associated with a transfer
  - `fileHash` string — SHA-256 hash of file content for deduplication. If provided and a duplicate exists, returns the existing document instead of creating a new upload request.
  - `remarks` string — Free-form remarks or notes about the document

## Response `201`

Upload request created successfully

- DocumentUploadResponseDto
  - `documentId` string, required — Document ID
  - `uploadUrl` string, required — Signed URL for uploading the document
  - `expiresAt` string, date-time, required — When the upload URL expires
  - `existingDocumentId` string — If a duplicate was found, returns existing document ID instead

## Other responses

- `401` — Unauthorized - Invalid or missing authentication credentials

---

[API](https://skmtc.dev/infinite/apis/infinite-api.md) · [All operations](https://skmtc.dev/infinite/apis/infinite-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infinite/infinite-api/revisions/5426f2706725/schema)
