---
title: "Updates the SourceDocument with the given ID."
method: PATCH
path: "/sdoc/{sdoc_id}"
tags: ["sourceDocument"]
---

# Updates the SourceDocument with the given ID.

`PATCH /sdoc/{sdoc_id}`

## Path parameters

- `sdoc_id` integer, required

## Request body

- SourceDocumentUpdate
  - `name` string, nullable — User-defined name of the document (default is the filename)
  - `folder_id` integer, nullable — ID of the Folder this SourceDocument belongs to
  - `extract_html` -100 | 0 | 1
  - `text_extraction` -100 | 0 | 1
  - `text_language_detection` -100 | 0 | 1
  - `text_spacy` -100 | 0 | 1
  - `text_es_index` -100 | 0 | 1
  - `text_sentence_embedding` -100 | 0 | 1
  - `text_html_mapping` -100 | 0 | 1
  - `image_caption` -100 | 0 | 1
  - `image_embedding` -100 | 0 | 1
  - `image_metadata_extraction` -100 | 0 | 1
  - `image_thumbnail` -100 | 0 | 1
  - `image_object_detection` -100 | 0 | 1
  - `audio_metadata` -100 | 0 | 1
  - `audio_thumbnail` -100 | 0 | 1
  - `audio_transcription` -100 | 0 | 1
  - `video_metadata` -100 | 0 | 1
  - `video_thumbnail` -100 | 0 | 1
  - `video_audio_extraction` -100 | 0 | 1

## Response `200`

Successful Response

- SourceDocumentRead
  - `filename` string, required — Filename of the SourceDocument
  - `name` string, required — User-defined name of the document (default is the filename)
  - `doctype` 'text' | 'image' | 'video' | 'audio', required
  - `project_id` integer, required — Project the SourceDocument belongs to
  - `id` integer, required — ID of the SourceDocument
  - `created` string, date-time, required — The created timestamp of the SourceDocument
  - `updated` string, date-time, required — Updated timestamp of the SourceDocument
  - `folder_id` integer, required — ID of the Folder this SourceDocument belongs to

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-15** `1af5a8046f20` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2025-09-18** `c5b78916c4e5` — 2 info
  - the response property `name` became required for the status `200`
  - response property `name` list-of-types was narrowed by removing types `null` from media type `application/json` of response `200`
- **2025-08-22** `53e769440a25` — 2 breaking, 2 warning
  - the response property `name` became optional for the status `200`
  - response property `name` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - removed the optional property `detail/items/ctx` from the response with the `422` status
  - removed the optional property `detail/items/input` from the response with the `422` status

[Change history](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/changes/sdoc/:sdoc_id/patch.md)

---

[API](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api.md) · [All operations](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uhh-lt/discourse-analysis-tool-suite-api/revisions/ebfa22e4da0a/schema)
