---
title: "PATCH /documents/{documentId}"
method: PATCH
path: "/documents/{documentId}"
---

# PATCH /documents/{documentId}

`PATCH /documents/{documentId}`

## Path parameters

- `documentId` string, required

## Headers

- `Content-Type` string, required

## Request body

- PatchDocumentId
  - `datasetId` string
  - `description` string, nullable
  - `groundTruth` object[]
    - `label` string, required
    - `value` union, required
      - string, nullable
      - boolean
      - number
      - union
        - object[]
          - `label` string, required
          - `value` union, required
            - string
            - boolean
            - number
            - GroundTruthList — recursive
        - array[]
          - object[]
            - `label` string, required
            - `value` union, required
              - …
  - `metadata` object
  - `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
      - number
      - union
        - object[]
          - `label` string, required
          - `value` union, required
            - string
            - boolean
            - number
            - GroundTruthList — recursive
        - array[]
          - object[]
            - `label` string, required
            - `value` union, required
              - …
  - `metadata` object, 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

## Changes

- **2022-03-16** `fc6ba1d5e844` — 1 breaking, 1 warning, 4 info
  - removed `subschema #1, subschema #2` from the `groundTruth/items/value/anyOf[#/components/schemas/groundTruthList]/` request property `anyOf` list
  - changed the pattern of the request property `groundTruth/items/label` from `^[0-9A-Za-z_]+$` to `^[0-9A-Za-z-_]+$`
  - added `subschema #1, subschema #2` to the `groundTruth/items/value/anyOf[#/components/schemas/groundTruthList]/` request property `anyOf` list
  - added `subschema #1, subschema #2` to the `groundTruth/items/value/anyOf[#/components/schemas/groundTruthList]/` response property `anyOf` list for the response status `200`
  - …2 more
- **2022-02-04** `2261469a6890` — 1 breaking, 5 info
  - removed `subschema #1` from the `groundTruth/items/value` request property `anyOf` list
  - added the new optional request property `metadata`
  - added `#/components/schemas/groundTruthList, subschema #1, subschema #3` to the `groundTruth/items/value` request property `anyOf` list
  - added `#/components/schemas/groundTruthList, subschema #1, subschema #3` to the `groundTruth/items/value` response property `anyOf` list for the response status `200`
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/lucidtechai/apis/lucidtech-api/changes/documents/:documentId/patch.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/fc6ba1d5e844/schema)
