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

# POST /documents

`POST /documents`

## Headers

- `Content-Type` string, required

## Request body

- PostDocuments
  - `consentId` string
  - `content` string, required
  - `contentType` 'application/pdf' | 'image/jpeg' | 'image/png' | 'image/tiff', required
  - `datasetId` string
  - `description` string, nullable
  - `groundTruth` object[]
    - `label` string, required
    - `value` union, required
      - string, nullable
      - boolean
  - `name` string, nullable
  - `retentionInDays` integer

## Response `200`

200 response

- Document
  - `consentId` string
  - `content` string
  - `contentType` 'application/pdf' | 'image/jpeg' | 'image/png' | 'image/tiff', required
  - `createdBy` string, nullable, required
  - `createdTime` string, nullable, required
  - `datasetId` string
  - `description` string, nullable, required
  - `documentId` string, required
  - `groundTruth` object[]
    - `label` string, required
    - `value` union, required
      - string, nullable
      - boolean
  - `name` string, nullable, required
  - `retentionInDays` integer, required
  - `updatedBy` string, nullable, required
  - `updatedTime` string, nullable, required

## Other responses

- `400` — 400 response
- `403` — 403 response
- `404` — 404 response
- `415` — 415 response
- `500` — 500 response

## Changes

- **2022-01-06** `79adeefb69f1` — 4 info
  - added the new optional request property `description`
  - added the new optional request property `name`
  - added the required property `description` to the response with the `200` status
  - added the required property `name` to the response with the `200` status
- **2021-11-05** `9788e6bfa925` — 9 breaking, 10 warning, 6 info
  - removed `#/components/schemas/groundTruthList, subschema #1, subschema #2, subschema #3` from the `groundTruth/items/value` request property `anyOf` list
  - the request property `contentType` became not nullable
  - the request property `content` became required
  - the request property `contentType` became required
  - …21 more

[Change history](https://skmtc.dev/lucidtechai/apis/lucidtech-api/changes/documents/post.md)

---

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