---
title: "POST /api/v1/documents"
method: POST
path: "/api/v1/documents"
---

# POST /api/v1/documents

`POST /api/v1/documents`

Creates a new document object and version object.

The client specifies the parent folder ID and name of the document to upload. The ID is optionally specified when creating a new version of an existing document. This is the first step to upload a document. Next, upload the document to the URL returned from the call, and then call UpdateDocumentVersion.

To cancel the document upload, call AbortDocumentVersionUpload.

## Headers

- `Authentication` string, password

## Request body

- object
  - `Id` string — The ID of the document.
  - `Name` string, password — The name of the document.
  - `ContentCreatedTimestamp` string, date-time — The timestamp when the content of the document was originally created.
  - `ContentModifiedTimestamp` string, date-time — The timestamp when the content of the document was modified.
  - `ContentType` string — The content type of the document.
  - `DocumentSizeInBytes` integer — The size of the document, in bytes.
  - `ParentFolderId` string — The ID of the parent folder.

## Response `201`

Success

- InitiateDocumentVersionUploadResponse
  - `Metadata` object — The document metadata.
    - `Id` string — The ID of the document.
    - `CreatorId` string — The ID of the creator.
    - `ParentFolderId` string — The ID of the parent folder.
    - `CreatedTimestamp` string, date-time — The time when the document was created.
    - `ModifiedTimestamp` string, date-time — The time when the document was updated.
    - `LatestVersionMetadata` object — The latest version of the document.
      - `Id` string — The ID of the version.
      - `Name` string, password — The name of the version.
      - `ContentType` string — The content type of the document.
      - `Size` integer — The size of the document, in bytes.
      - `Signature` string — The signature of the document.
      - `Status` 'INITIALIZED' | 'ACTIVE' — The status of the document.
      - `CreatedTimestamp` string, date-time — The timestamp when the document was first uploaded.
      - `ModifiedTimestamp` string, date-time — The timestamp when the document was last uploaded.
      - `ContentCreatedTimestamp` string, date-time — The timestamp when the content of the document was originally created.
      - `ContentModifiedTimestamp` string, date-time — The timestamp when the content of the document was modified.
      - `CreatorId` string — The ID of the creator.
      - `Thumbnail` object — The thumbnail of the document.
      - `Source` object — The source of the document.
    - `ResourceState` 'ACTIVE' | 'RESTORING' | 'RECYCLING' | 'RECYCLED' — The resource state.
    - `Labels` SharedLabel[] — List of labels on the document.
  - `UploadMetadata` object — The upload metadata.
    - `UploadUrl` string, password — The URL of the upload.
    - `SignedHeaders` object — The signed headers.

## Other responses

- `480` — EntityNotExistsException
- `481` — EntityAlreadyExistsException
- `482` — StorageLimitExceededException
- `483` — StorageLimitWillExceedException
- `484` — LimitExceededException
- `485` — ProhibitedStateException
- `486` — UnauthorizedOperationException
- `487` — UnauthorizedResourceAccessException
- `488` — FailedDependencyException
- `489` — ServiceUnavailableException
- `490` — DraftUploadOutOfSyncException
- `491` — ResourceAlreadyCheckedOutException
- `492` — InvalidPasswordException
- `493` — InvalidArgumentException

---

[API](https://skmtc.net/aws/apis/workdocs.md) · [All operations](https://skmtc.net/aws/apis/workdocs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/workdocs/versions/8a533af4e1ef/schema)
