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

# POST /documents

`POST /documents`

## Headers

- `Content-Type` string, required

## Request body

- PostDocuments
  - `consentId` string
  - `content` string
  - `contentType` 'application/pdf' | 'image/jpeg' | 'image/png' | 'image/tiff' | 'image/webp', nullable
  - `datasetId` string
  - `description` string, nullable
  - `groundTruth` object[]
    - `confidence` number
    - `label` string, required
    - `pages` integer[]
    - `value` union, required
      - string, nullable
      - boolean, nullable
      - number, nullable
      - union
        - object[]
          - `confidence` number
          - `label` string, required
          - `pages` integer[]
          - `value` union, required
            - string
            - boolean
            - number
            - GroundTruthList — recursive
        - array[]
          - object[]
            - `confidence` number
            - `label` string, required
            - `pages` integer[]
            - `value` union, required
              - …
  - `metadata` object
  - `name` string, nullable
  - `retentionInDays` integer

## Response `200`

200 response

- Document
  - `consentId` string
  - `content` string, nullable
  - `contentMD5` string, nullable
  - `contentType` 'application/pdf' | 'image/jpeg' | 'image/png' | 'image/tiff' | 'image/webp', nullable
  - `createdBy` string, nullable, required
  - `createdTime` string, nullable, required
  - `datasetId` string
  - `description` string, nullable, required
  - `documentId` string, required
  - `fileUrl` string, nullable
  - `groundTruth` object[]
    - `confidence` number
    - `label` string, required
    - `pages` integer[]
    - `value` union, required
      - string, nullable
      - boolean, nullable
      - number, nullable
      - union
        - object[]
          - `confidence` number
          - `label` string, required
          - `pages` integer[]
          - `value` union, required
            - string
            - boolean
            - number
            - GroundTruthList — recursive
        - array[]
          - object[]
            - `confidence` number
            - `label` string, required
            - `pages` integer[]
            - `value` union, required
              - …
  - `metadata` object, nullable, required
  - `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

---

[API](https://skmtc.net/lucidtechai/apis/lucidtech-api.md) · [All operations](https://skmtc.net/lucidtechai/apis/lucidtech-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lucidtechai/lucidtech-api/versions/d5fe190026be/schema)
