---
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
  - `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` — 6 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 `groundTruth` became not nullable
  - the `content` response property's maxLength was unset from `6250000` for the response status `200`
  - removed the required property `description` from the response with the `200` status
  - …18 more

[Change 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/79adeefb69f1/schema)
