---
title: "Update a single Document"
method: PATCH
path: "/documents/{id}.json"
tags: ["Documents"]
---

# Update a single Document

`PATCH /documents/{id}.json`

Update Document, move Document to another Folder, and/or restore a trashed Document.

## Path parameters

- `id` integer, required

## Query parameters

- `fields` string

## Headers

- `IF-MATCH` string
- `X-API-VERSION` string

## Request body

- object
  - `data` object, required
    - `communication_id` integer — Related communication record.
    - `copy_version` boolean — Indicates whether to create a new version with the updated filename on rename. This is intended to handle cases where the document extension has been changed; if the document extension has not changed, no new version will be created.
    - `document_category` object
      - `id` integer — The unique identifier for a single DocumentCategory associated with the Document. Use the keyword `null` to specify no association.
    - `external_properties` object[]
      - `id` integer — The unique identifier for a single ExternalProperty associated with the Document. The keyword `null` is not valid for this field.
      - `name` string — The ExternalProperty name. Note: **there is a limit of 5 external_properties per Document**
      - `value` string — The ExternalProperty value.
      - `_destroy` boolean — The destroy flag. If the flag is set to `true` and the unique identifier of the associated ExternalProperty is present, the ExternalProperty is deleted from the Document.
    - `fully_uploaded` boolean — Indicates whether document is uploaded. When marking the document fully uploaded, it arises errors when: * The file is not successfully uploaded. * Not all the file parts are uploaded. * The document is already marked as fully uploaded.
    - `multiparts` object[]
      - `part_number` integer — The part number of multipart upload. It must be an integer between 1 to 10,000, inclusive. Multipart upload supports upload a single file as a set of parts. Each part is a contiguous portion of the data. A `part_number` uniquely identifies a part and also defines its position within the document being uploaded. Each part must be at least 5 MB in size, except the last part. There is no minimum size limit on the last part. The URLs of multipart upload are returned in the field, `put_url`, with the corresponding `multipart` The API handles maximum 50 `multiparts` in one request. If the upload is split to more than 50 parts, make a PUT request with `fully_uploaded` equal to `false`, and another set of part numbers.
      - `content_length` string — The size of the part of the upload file in bytes.
      - `content_md5` string — The base64-encoded 128-bit MD5 digest of the part data. This header can be used as a message integrity check to verify that the part data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check.
    - `name` string — Document name.
    - `parent` object
      - `id` integer — The unique identifier of the parent object.
      - `type` 'Document' | 'Folder' | 'Contact' | 'Matter' — Type of parent object: * "Document" represents an existing Clio document. It is specified when you provide a new revision (or document version) to an existing document. * "Folder" represents a specified folder on Clio by folder id. It if specified when you add / move an item to a folder. * "Contact" represents a contact folder on Clio identified by contact id. It is specified when you add / move an item to a contact folder. A contact folder will be created for the specified contact if none exists already. * "Matter" represents a matter folder on Clio identified by matter id. It is specified when you add / move an item to a matter folder.
    - `received_at` string, date-time — Date and time the document was received (Expects an ISO-8601 timestamp).
    - `restore` boolean — Whether or not a trashed Document should be restored.
    - `uuid` string — UUID associated with the document version. UUID is required to mark a document fully uploaded.

## Response `200`

Ok

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `412` — Precondition Failed
- `422` — Unprocessable Entity
- `429` — Too Many Requests

---

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