---
title: "Update document"
method: PATCH
path: "/v1/documents/{documentId}"
tags: ["Documents"]
---

# Update document

`PATCH /v1/documents/{documentId}`

Update a document in your workspace

## Path parameters

- `documentId` string, required

## Request body

- DocumentUpdateDto
  - `userId` string, required — The ID of the user updating the document
  - `content` string — The updated content of the document
  - `name` string, required — The name of the document
  - `status` 'DRAFT' | 'PUBLISHED' | 'IN PROGRESS' | 'IN REVIEW' | 'COMPLETED' — The status of the document
  - `projectId` string — The ID of the project to associate the document with. Pass an empty string to detach the document from its current project.

## Response `200`

Updated document

- DocumentResponse
  - `requestId` string
  - `resource` string
  - `data` DocumentsData[]
    - `id` string, required — The unique identifier of the document
    - `content` string, required — The content of the document
    - `createdAt` string, date-time — The creation date of the document
    - `updatedAt` string, date-time — The last updated date of the document
    - `name` string, required — The name of the document
    - `status` string, required — The status of the document
    - `userId` string, required — The user Id associated with the workspace
    - `projectId` string — The ID of the project the document is associated with, if any. Documents created before project association was supported may have this field empty.

## Other responses

- `401` — Unauthorized. User is not a member of the workspace.
- `404` — Not found. May have an incorrect URL path.
- `500` — Internal server error. Unable to update document.

---

[API](https://skmtc.net/jasper/apis/jasper-api.md) · [All operations](https://skmtc.net/jasper/apis/jasper-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jasper/jasper-api/revisions/438914d9525e/schema)
