---
title: "Patch Document"
method: PATCH
path: "/api/folders/documents/{document_id}"
tags: ["domains"]
---

# Patch Document

`PATCH /api/folders/documents/{document_id}`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/folders/documents/{document_id}`
- Auth: none declared

Update document title and/or tags. Identity-scoped; contributor+ on the
doc's folder if shared.

## Path parameters

- `document_id` string, uuid, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Request body

- PatchDocumentRequest
  - `title` string, nullable
  - `tags` string[], nullable
  - `published` boolean, nullable
  - `sync_excluded` boolean, nullable
  - `source_time` SourceTime: When source content happened, was observed, and entered thinqOS.
    - `occurred_at` string, date-time, nullable
    - `observed_at` string, date-time, nullable
    - `recorded_at` string, date-time, nullable
    - `precision` 'instant' | 'day' | 'month' | 'year', nullable
    - `provenance` 'stated' | 'parsed_from_title' | 'parsed_from_body' | 'inferred' | 'unknown'
    - `timezone` string, nullable
    - `evidence` string, nullable

## Response `200`

Successful Response

- DocumentResponse
  - `id` string, uuid, required
  - `source_id` string, required
  - `title` string
  - `status` string, required
  - `chunk_count` integer, required
  - `indexed_at` string, date-time, nullable, required
  - `error_message` string, nullable, required
  - `scope` string, required
  - `library_id` string, uuid, nullable
  - `tags` string[]
  - `created_at` string, date-time, nullable, required
  - `modified_at` string, date-time, nullable
  - `size_bytes` integer, nullable
  - `has_original` boolean
  - `document_kind` string
  - `slug` string, nullable
  - `original_content_type` string, nullable
  - `original_filename` string, nullable
  - `title_source` string, nullable
  - `has_fit` boolean
  - `deleted_at` string, date-time, nullable
  - `mind_extraction` MindExtractionScopeResponse: How much of a document actually reached Mind extraction (TOS-2063). Historical metadata from the retired inline document extraction worker. Existing document responses retain this read-only record; current teaching uses provenance imprints and resumable episode state instead.
    - `episodes_taught` integer, required
    - `episodes_total` integer, required
    - `truncated` boolean, required
  - `source_time` SourceTime: When source content happened, was observed, and entered thinqOS.
    - `occurred_at` string, date-time, nullable
    - `observed_at` string, date-time, nullable
    - `recorded_at` string, date-time, nullable
    - `precision` 'instant' | 'day' | 'month' | 'year', nullable
    - `provenance` 'stated' | 'parsed_from_title' | 'parsed_from_body' | 'inferred' | 'unknown'
    - `timezone` string, nullable
    - `evidence` string, nullable
  - `published` boolean
  - `sync_excluded` boolean
  - `mind_mode` 'immediate' | 'first_save' | 'never'
  - `mind_refresh_status` 'current' | 'queued' | 'failed'

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/ce2c2ce318b1?raw)
