tags: Replace ALL tags for the document (both manual and auto-assigned)
external_metadata: Create or update external source metadata
file: Replace the original file and re-ingest the document
Tag replacement behavior:
Providing a tags array replaces ALL existing tags (manual and auto-assigned)
To remove all tags, send [0] (sentinel value for multipart format)
Omitting tags field leaves tags unchanged
New tags are marked as manually assigned (auto_assigned=False)
External metadata behavior:
When creating for the first time, external_id is required
When updating existing metadata, external_id is optional (existing value is preserved)
Fields in additional_metadata are merged (not replaced) with existing values
external_id cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. doc_type and additional_metadata stay editable
File replacement behavior:
The document keeps its id, title, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt.
Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file.
Replacing the file additionally requires an owner or editor role in the document’s workspace, and is not available in workspaces configured for synced documents.
The storage quota is checked on the size difference, not the full new size.
file can be combined with title, tags and external_metadata in the same request: the metadata changes apply immediately, the file is queued.
The response reflects the document as it still is: filename, extension, size, total_pages, status, signature, summaries and content describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts.
pending_reprocess is set to update on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: status still reports the previous run’s outcome (typically Embedded) until the pipeline picks the document up. Poll until pending_reprocess is null andstatus is terminal — treating a terminal status alone as completion reports success against the previous file.
Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live.
Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. download?purpose=rendered_pdf serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on status rather than on the download succeeding.
The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything.
Public datasets: editing a public-dataset file requires the instance-admin MANAGE_PUBLIC_DATASET permission. A workspace-scoped API key with read access (company opted in via allow_access_to_public_datasets) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.
Request serializer for PATCH /api/v3/files/{id} endpoint.
Allows partial updates to mutable document fields:
title: Update the document title
tags: Replace ALL tags for the document (both manual and auto-assigned)
external_metadata: Create or update external source metadata
file: Replace the original file and re-ingest (document keeps its id)
Immutable fields (if provided, will return 400):
filename, workspace_id, parser, etc.
file
string<uri>
New original file. The document is re-ingested from the new content. Any supported file type is accepted, including one that differs from the current file. Until re-ingestion starts the document still serves its previous content.
title
string
Updated title for the document.
Maximum string length: 255
tags
integer[]
List of tag IDs to replace ALL existing tags (both manual and auto-assigned). To remove all tags when using multipart format, send [0] as the sentinel value.
external_metadata
object | null
External source metadata to create or update. external_id is required when no external metadata record exists yet. Fields in additional_metadata are merged (not replaced) with existing values.
Show child attributes
Response
File updated successfully
id
integer
required
read-only
filename
string
required
read-only
Filename of the document
workspace
object | null
required
Workspace the document belongs to
Show child attributes
summaries
object[]
required
read-only
Document summaries (all languages)
Show child attributes
extension
string
required
File extension of the document
created_at
string<date-time>
required
Creation date of the resource
updated_at
string<date-time>
required
read-only
total_pages
integer
required
read-only
Total number of pages
tags
object[]
required
read-only
List of tags associated with the document
Show child attributes
created_by
object | null
required
User who created the file. Null when the file was created by the system.
Show child attributes
upload_session_uuid
string<uuid> | null
required
read-only
Upload session UUID associated with this document
signature
string | null
required
read-only
TLSH hash for duplicate detection.
content_types
object[]
required
read-only
Facet content types with nested attribute values. Excludable via ?exclude=content_types.
Show child attributes
thumbnail
object
required
Thumbnail preview of the document (256x256 WebP).
Show child attributes
pending_reprocess
enum<string> | null
required
The reprocessing level queued for this document, or null when none is. Non-null means work has been accepted but has not started yet — status and status_vision still describe the previous run. It clears the moment processing starts, from which point the statuses track the new run. update (a file replacement) additionally leaves the file-derived fields (filename, extension, size, total_pages, signature, summaries, content) describing the previous file until then.
Available options:
reparse,
rechunk,
reembed,
reembed_vision,
update
title
string | null
Maximum string length: 255
status
enum<string>
pending - Pending
pending_conversion - Pending Conversion
converting - Converting
parsing - Parsing
parsing_failed - Parsing Failed
embedding - Embedding
embedding_failed - Embedding Failed
embedded - Embedded
parsed - Parsed
fail - Fail
updating - Updating
Available options:
pending,
pending_conversion,
converting,
parsing,
parsing_failed,
embedding,
embedding_failed,
embedded,
parsed,
fail,
updating
status_vision
enum<string>
pending - Pending
processing - Processing
embedded - Embedded
fail - Fail
- - Not available
Available options:
pending,
processing,
embedded,
fail,
-
size
integer | null
read-only
Size of the file in bytes.
content
string | null
deprecated
read-only
Deprecated — use pages[] instead. Full text content of the document, derived from per-page text, as a single flat string. Only included when include_content=true query parameter is provided. Will be removed in a future release.
pages
object[]
read-only
Per-page document text in the canonical { index, markdown } shape shared with /parse and /ocr. Only included when include_content=true. Intended replacement for the flat content string. For documents ingested before per-page text was stored, the full content is returned as a single page (index 1); empty only when there is no content at all.
Show child attributes
status_detail
string | null
Detailed error information. Only present when document processing has failed.
parser
string | null
Parser/ingestion pipeline used for document processing (e.g., 'v2.1', 'v3.0').
external_metadata
object | null
External document metadata
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LightOn Developers","colors":{"primary":"#1f99bb","light":"#1f99bb","dark":"#1f99bb"},"logo":{"light":"https://mintcdn.com/lighton-developers/dojq_qF_vSGGGm4-/logo/light.svg?fit=max\u0026auto=format\u0026n=dojq_qF_vSGGGm4-\u0026q=85\u0026s=345d3b10124f99971a7737a9f06f2886","dark":"https://mintcdn.com/lighton-developers/dojq_qF_vSGGGm4-/logo/dark.svg?fit=max\u0026auto=format\u0026n=dojq_qF_vSGGGm4-\u0026q=85\u0026s=d1c2d4800c07667359bb3abf2437e7aa"},"favicon":"https://mintcdn.com/lighton-developers/p54dDELPycbNT9ym/favicon.svg?fit=max\u0026auto=format\u0026n=p54dDELPycbNT9ym\u0026q=85\u0026s=c9a4897b47f6d0e0d035509f82d5c847","navbar":{"primary":{"type":"button","label":"Console","href":"https://console.lighton.ai"}},"footer":{"socials":{"x":"https://x.com/lightonio","linkedin":"https://www.linkedin.com/company/lighton","bluesky":"https://bsky.app/profile/lightonai.bsky.social","youtube":"https://www.youtube.com/@lighton4013","website":"https://lighton.ai/newsletter"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Playground","icon":"circle-play","href":"https://console.lighton.ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lighton-developers","hasAudioNarration":false,"actualSubdomain":"lighton-developers","customDomains":["developers.lighton.ai"],"gitSource":{"type":"github","owner":"lightonai","repo":"lighton-developers-documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae0d933663d8e17af01bd02","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"API Reference","count":50},{"language":"default","tag":"Intelligence","count":30},{"language":"default","tag":"Tutorials","count":15},{"language":"default","tag":"Facets","count":14},{"language":"default","tag":"Administration","count":13},{"language":"default","tag":"MCP Server","count":9},{"language":"default","tag":"Integrations","count":8},{"language":"default","tag":"Classify and organise documents","count":8},{"language":"default","tag":"Workspaces","count":8},{"language":"default","tag":"Budget","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@lighton.ai"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/files/update-file-metadata-or-replace-its-file","slug":"/api-reference/files/update-file-metadata-or-replace-its-file","pageMetadata":{"title":"Update file metadata or replace its file","description":"Update mutable fields of a file (document).\n\n**Updatable fields:**\n- `title`: Update the document title\n- `tags`: Replace ALL tags for the document (both manual and auto-assigned)\n- `external_metadata`: Create or update external source metadata\n- `file`: Replace the original file and re-ingest the document\n\n**Tag replacement behavior:**\n- Providing a tags array replaces ALL existing tags (manual and auto-assigned)\n- To remove all tags, send `[0]` (sentinel value for multipart format)\n- Omitting `tags` field leaves tags unchanged\n- New tags are marked as manually assigned (`auto_assigned=False`)\n\n**External metadata behavior:**\n- When creating for the first time, `external_id` is required\n- When updating existing metadata, `external_id` is optional (existing value is preserved)\n- Fields in `additional_metadata` are merged (not replaced) with existing values\n- `external_id` cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. `doc_type` and `additional_metadata` stay editable\n\n**File replacement behavior:**\n- The document keeps its `id`, `title`, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt.\n- Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file.\n- Replacing the file additionally requires an owner or editor role in the document's workspace, and is not available in workspaces configured for synced documents.\n- The storage quota is checked on the size difference, not the full new size.\n- `file` can be combined with `title`, `tags` and `external_metadata` in the same request: the metadata changes apply immediately, the file is queued.\n- The response reflects the document as it still is: `filename`, `extension`, `size`, `total_pages`, `status`, `signature`, `summaries` and `content` describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts.\n- `pending_reprocess` is set to `update` on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: `status` still reports the previous run's outcome (typically `Embedded`) until the pipeline picks the document up. Poll until `pending_reprocess` is null **and** `status` is terminal — treating a terminal `status` alone as completion reports success against the previous file.\n- Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live.\n- Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. `download?purpose=rendered_pdf` serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on `status` rather than on the download succeeding.\n- The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything.\n\n**Public datasets:** editing a public-dataset file requires the instance-admin `MANAGE_PUBLIC_DATASET` permission. A workspace-scoped API key with read access (company opted in via `allow_access_to_public_datasets`) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\n","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/files/{id}","href":"/api-reference/files/update-file-metadata-or-replace-its-file","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Update mutable fields of a file (document).\"\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Updatable fields:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"title\"\n }), \": Update the document title\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"tags\"\n }), \": Replace ALL tags for the document (both manual and auto-assigned)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"external_metadata\"\n }), \": Create or update external source metadata\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"file\"\n }), \": Replace the original file and re-ingest the document\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Tag replacement behavior:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Providing a tags array replaces ALL existing tags (manual and auto-assigned)\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"To remove all tags, send \", _jsx(_components.code, {\n children: \"[0]\"\n }), \" (sentinel value for multipart format)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Omitting \", _jsx(_components.code, {\n children: \"tags\"\n }), \" field leaves tags unchanged\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"New tags are marked as manually assigned (\", _jsx(_components.code, {\n children: \"auto_assigned=False\"\n }), \")\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"External metadata behavior:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"When creating for the first time, \", _jsx(_components.code, {\n children: \"external_id\"\n }), \" is required\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"When updating existing metadata, \", _jsx(_components.code, {\n children: \"external_id\"\n }), \" is optional (existing value is preserved)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Fields in \", _jsx(_components.code, {\n children: \"additional_metadata\"\n }), \" are merged (not replaced) with existing values\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"external_id\"\n }), \" cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. \", _jsx(_components.code, {\n children: \"doc_type\"\n }), \" and \", _jsx(_components.code, {\n children: \"additional_metadata\"\n }), \" stay editable\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"File replacement behavior:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"The document keeps its \", _jsx(_components.code, {\n children: \"id\"\n }), \", \", _jsx(_components.code, {\n children: \"title\"\n }), \", manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file.\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Replacing the file additionally requires an owner or editor role in the document’s workspace, and is not available in workspaces configured for synced documents.\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"The storage quota is checked on the size difference, not the full new size.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"file\"\n }), \" can be combined with \", _jsx(_components.code, {\n children: \"title\"\n }), \", \", _jsx(_components.code, {\n children: \"tags\"\n }), \" and \", _jsx(_components.code, {\n children: \"external_metadata\"\n }), \" in the same request: the metadata changes apply immediately, the file is queued.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"The response reflects the document as it still is: \", _jsx(_components.code, {\n children: \"filename\"\n }), \", \", _jsx(_components.code, {\n children: \"extension\"\n }), \", \", _jsx(_components.code, {\n children: \"size\"\n }), \", \", _jsx(_components.code, {\n children: \"total_pages\"\n }), \", \", _jsx(_components.code, {\n children: \"status\"\n }), \", \", _jsx(_components.code, {\n children: \"signature\"\n }), \", \", _jsx(_components.code, {\n children: \"summaries\"\n }), \" and \", _jsx(_components.code, {\n children: \"content\"\n }), \" describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"pending_reprocess\"\n }), \" is set to \", _jsx(_components.code, {\n children: \"update\"\n }), \" on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: \", _jsx(_components.code, {\n children: \"status\"\n }), \" still reports the previous run’s outcome (typically \", _jsx(_components.code, {\n children: \"Embedded\"\n }), \") until the pipeline picks the document up. Poll until \", _jsx(_components.code, {\n children: \"pending_reprocess\"\n }), \" is null \", _jsx(_components.strong, {\n children: \"and\"\n }), \" \", _jsx(_components.code, {\n children: \"status\"\n }), \" is terminal — treating a terminal \", _jsx(_components.code, {\n children: \"status\"\n }), \" alone as completion reports success against the previous file.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. \", _jsx(_components.code, {\n children: \"download?purpose=rendered_pdf\"\n }), \" serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on \", _jsx(_components.code, {\n children: \"status\"\n }), \" rather than on the download succeeding.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything.\"\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Public datasets:\"\n }), \" editing a public-dataset file requires the instance-admin \", _jsx(_components.code, {\n children: \"MANAGE_PUBLIC_DATASET\"\n }), \" permission. A workspace-scoped API key with read access (company opted in via \", _jsx(_components.code, {\n children: \"allow_access_to_public_datasets\"\n }), \") can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update file metadata or replace its file","description":"Update mutable fields of a file (document).\n\n**Updatable fields:**\n- `title`: Update the document title\n- `tags`: Replace ALL tags for the document (both manual and auto-assigned)\n- `external_metadata`: Create or update external source metadata\n- `file`: Replace the original file and re-ingest the document\n\n**Tag replacement behavior:**\n- Providing a tags array replaces ALL existing tags (manual and auto-assigned)\n- To remove all tags, send `[0]` (sentinel value for multipart format)\n- Omitting `tags` field leaves tags unchanged\n- New tags are marked as manually assigned (`auto_assigned=False`)\n\n**External metadata behavior:**\n- When creating for the first time, `external_id` is required\n- When updating existing metadata, `external_id` is optional (existing value is preserved)\n- Fields in `additional_metadata` are merged (not replaced) with existing values\n- `external_id` cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. `doc_type` and `additional_metadata` stay editable\n\n**File replacement behavior:**\n- The document keeps its `id`, `title`, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt.\n- Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file.\n- Replacing the file additionally requires an owner or editor role in the document's workspace, and is not available in workspaces configured for synced documents.\n- The storage quota is checked on the size difference, not the full new size.\n- `file` can be combined with `title`, `tags` and `external_metadata` in the same request: the metadata changes apply immediately, the file is queued.\n- The response reflects the document as it still is: `filename`, `extension`, `size`, `total_pages`, `status`, `signature`, `summaries` and `content` describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts.\n- `pending_reprocess` is set to `update` on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: `status` still reports the previous run's outcome (typically `Embedded`) until the pipeline picks the document up. Poll until `pending_reprocess` is null **and** `status` is terminal — treating a terminal `status` alone as completion reports success against the previous file.\n- Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live.\n- Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. `download?purpose=rendered_pdf` serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on `status` rather than on the download succeeding.\n- The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything.\n\n**Public datasets:** editing a public-dataset file requires the instance-admin `MANAGE_PUBLIC_DATASET` permission. A workspace-scoped API key with read access (company opted in via `allow_access_to_public_datasets`) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\n","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/files/{id}","href":"/api-reference/files/update-file-metadata-or-replace-its-file","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"api_v3_files_partial_update","description":"Update mutable fields of a file (document).\n\n**Updatable fields:**\n- `title`: Update the document title\n- `tags`: Replace ALL tags for the document (both manual and auto-assigned)\n- `external_metadata`: Create or update external source metadata\n- `file`: Replace the original file and re-ingest the document\n\n**Tag replacement behavior:**\n- Providing a tags array replaces ALL existing tags (manual and auto-assigned)\n- To remove all tags, send `[0]` (sentinel value for multipart format)\n- Omitting `tags` field leaves tags unchanged\n- New tags are marked as manually assigned (`auto_assigned=False`)\n\n**External metadata behavior:**\n- When creating for the first time, `external_id` is required\n- When updating existing metadata, `external_id` is optional (existing value is preserved)\n- Fields in `additional_metadata` are merged (not replaced) with existing values\n- `external_id` cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. `doc_type` and `additional_metadata` stay editable\n\n**File replacement behavior:**\n- The document keeps its `id`, `title`, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt.\n- Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file.\n- Replacing the file additionally requires an owner or editor role in the document's workspace, and is not available in workspaces configured for synced documents.\n- The storage quota is checked on the size difference, not the full new size.\n- `file` can be combined with `title`, `tags` and `external_metadata` in the same request: the metadata changes apply immediately, the file is queued.\n- The response reflects the document as it still is: `filename`, `extension`, `size`, `total_pages`, `status`, `signature`, `summaries` and `content` describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts.\n- `pending_reprocess` is set to `update` on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: `status` still reports the previous run's outcome (typically `Embedded`) until the pipeline picks the document up. Poll until `pending_reprocess` is null **and** `status` is terminal — treating a terminal `status` alone as completion reports success against the previous file.\n- Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live.\n- Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. `download?purpose=rendered_pdf` serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on `status` rather than on the download succeeding.\n- The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything.\n\n**Public datasets:** editing a public-dataset file requires the instance-admin `MANAGE_PUBLIC_DATASET` permission. A workspace-scoped API key with read access (company opted in via `allow_access_to_public_datasets`) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\n","summary":"Update file metadata or replace its file","parameters":["7ff58a13-6246-4093-9fd2-0b2e4f1e54be"],"tags":["Files"],"requestBody":"99ac2275-a7e0-4f58-a0c9-28d12765acea","security":["cfc071e2-2ffe-497a-b797-0e4a9769f867"],"responses":{"200":"969a4bc3-c043-4b83-acb7-063cae23b8fd","400":"19c92e2b-fe4f-4842-ae5e-2757dde67c82","401":"aba97f8f-1a5d-4cf1-985e-184269955521","403":"88c07287-3c98-44b2-a14e-f8dd503bedcd","404":"d9581688-eacb-4784-adf7-634a1cb1a68f","422":"c454e83c-ce9d-4639-a569-3584acab18b8","503":"ce78c8ad-59e6-40e1-a820-6b854ad67d00"},"method":"patch","type":"path","servers":["48c3fa0c-537e-4ab8-b62c-fc02ab11f431"],"path":"/api/v3/files/{id}","baseUrlOptions":["https://api.lighton.ai"],"title":"Update file metadata or replace its file","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"7ff58a13-6246-4093-9fd2-0b2e4f1e54be":{"in":"path","name":"id","schema":{"type":"integer","isRequired":true,"description":"A unique integer value identifying this Document.","uniqueKey":"","typeLabel":"integer"},"description":"A unique integer value identifying this Document.","required":true}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","description":"Request serializer for PATCH /api/v3/files/{id} endpoint.\n\nAllows partial updates to mutable document fields:\n- title: Update the document title\n- tags: Replace ALL tags for the document (both manual and auto-assigned)\n- external_metadata: Create or update external source metadata\n- file: Replace the original file and re-ingest (document keeps its id)\n\nImmutable fields (if provided, will return 400):\n- filename, workspace_id, parser, etc.","properties":{"file":{"type":"string","format":"uri","description":"New original file. The document is re-ingested from the new content. Any supported file type is accepted, including one that differs from the current file. Until re-ingestion starts the document still serves its previous content.","uniqueKey":"file","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Updated title for the document.","maxLength":255,"uniqueKey":"title","typeLabel":"string"},"tags":{"type":"array","items":{"type":"integer","uniqueKey":"tags.items.[INDEX]","typeLabel":"integer"},"description":"List of tag IDs to replace ALL existing tags (both manual and auto-assigned). To remove all tags when using multipart format, send [0] as the sentinel value.","uniqueKey":"tags","typeLabel":"integer[]"},"external_metadata":{"oneOf":[{"type":"object","description":"External source metadata to create or update. `external_id` is required when no external metadata record exists yet. Fields in `additional_metadata` are merged (not replaced) with existing values.","properties":{"external_id":{"type":"string","description":"External document ID in the source system. Required when creating external metadata for the first time.","uniqueKey":"external_metadata.oneOf.0.external_id","typeLabel":"string"},"doc_type":{"type":"string","description":"External document type (e.g. 'incident', 'page')","uniqueKey":"external_metadata.oneOf.0.doc_type","typeLabel":"string"},"additional_metadata":{"description":"Arbitrary JSON object with extra information about the document (e.g. URL, version, timestamps). Passed through as-is.","uniqueKey":"external_metadata.oneOf.0.additional_metadata","typeLabel":"any"}},"uniqueKey":"external_metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"External source metadata to create or update. `external_id` is required when no external metadata record exists yet. Fields in `additional_metadata` are merged (not replaced) with existing values.","uniqueKey":"external_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"external_metadata","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"UpdateTitleOnly":{"title":"UpdateTitleOnly","description":"Update only the document title","value":{"title":"Updated Document Title"}},"ReplaceAllTags":{"title":"ReplaceAllTags","description":"Replace all existing tags (both manual and auto-assigned) with new ones. Tags can be sent as a JSON array string (e.g., '[1,2]') or as multiple form fields with the same name.","value":{"tags":[1,2]}},"RemoveAllTags":{"title":"RemoveAllTags","description":"Remove all tags using sentinel value [0]","value":{"tags":[0]}},"CreateExternalMetadata":{"title":"CreateExternalMetadata","description":"Attach external source metadata to a document that has none yet. `external_id` is required for creation. `external_metadata` must be sent as a JSON string when using multipart/form-data.","value":{"external_metadata":{"external_id":"gitlab-issue-456","doc_type":"gitlab_issue","additional_metadata":{"external_url":"https://gitlab.example.com/project/-/issues/456","name":"Fix authentication bug"}}}},"UpdateExistingExternalMetadata":{"title":"UpdateExistingExternalMetadata","description":"Update fields on an existing external metadata record. `external_id` is optional when a record already exists — it will be preserved if omitted. Fields inside `additional_metadata` are merged with existing values, not replaced.","value":{"external_metadata":{"additional_metadata":{"last_synced_at":"2024-01-15T10:00:00Z","name":"Updated Name"}}}},"ReplaceTheFile":{"title":"ReplaceTheFile","description":"Send a new original as the `file` part of a multipart request. The document keeps its id, title, manual tags, facets and external metadata, and is re-ingested from the new content. Until re-ingestion begins it still serves its previous file.","value":{"file":"(binary file data)"}},"ReplaceTheFileAndRenameTheDocument":{"title":"ReplaceTheFileAndRenameTheDocument","description":"Metadata changes apply immediately; the file is queued for re-ingestion. The document `title` is only ever changed when explicitly provided — it never follows the new file's name.","value":{"file":"(binary file data)","title":"Q4 Report (revised)"}}},"exampleType":"examples"},"application/x-www-form-urlencoded":{"schema":{"type":"object","description":"Request serializer for PATCH /api/v3/files/{id} endpoint.\n\nAllows partial updates to mutable document fields:\n- title: Update the document title\n- tags: Replace ALL tags for the document (both manual and auto-assigned)\n- external_metadata: Create or update external source metadata\n- file: Replace the original file and re-ingest (document keeps its id)\n\nImmutable fields (if provided, will return 400):\n- filename, workspace_id, parser, etc.","properties":{"file":{"type":"string","format":"uri","description":"New original file. The document is re-ingested from the new content. Any supported file type is accepted, including one that differs from the current file. Until re-ingestion starts the document still serves its previous content.","uniqueKey":"file","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Updated title for the document.","maxLength":255,"uniqueKey":"title","typeLabel":"string"},"tags":{"type":"array","items":{"type":"integer","uniqueKey":"tags.items.[INDEX]","typeLabel":"integer"},"description":"List of tag IDs to replace ALL existing tags (both manual and auto-assigned). To remove all tags when using multipart format, send [0] as the sentinel value.","uniqueKey":"tags","typeLabel":"integer[]"},"external_metadata":{"oneOf":[{"type":"object","description":"External source metadata to create or update. `external_id` is required when no external metadata record exists yet. Fields in `additional_metadata` are merged (not replaced) with existing values.","properties":{"external_id":{"type":"string","description":"External document ID in the source system. Required when creating external metadata for the first time.","uniqueKey":"external_metadata.oneOf.0.external_id","typeLabel":"string"},"doc_type":{"type":"string","description":"External document type (e.g. 'incident', 'page')","uniqueKey":"external_metadata.oneOf.0.doc_type","typeLabel":"string"},"additional_metadata":{"description":"Arbitrary JSON object with extra information about the document (e.g. URL, version, timestamps). Passed through as-is.","uniqueKey":"external_metadata.oneOf.0.additional_metadata","typeLabel":"any"}},"uniqueKey":"external_metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"External source metadata to create or update. `external_id` is required when no external metadata record exists yet. Fields in `additional_metadata` are merged (not replaced) with existing values.","uniqueKey":"external_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"external_metadata","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"UpdateTitleOnly":{"title":"UpdateTitleOnly","description":"Update only the document title","value":{"title":"Updated Document Title"}},"ReplaceAllTags":{"title":"ReplaceAllTags","description":"Replace all existing tags (both manual and auto-assigned) with new ones. Tags can be sent as a JSON array string (e.g., '[1,2]') or as multiple form fields with the same name.","value":{"tags":[1,2]}},"RemoveAllTags":{"title":"RemoveAllTags","description":"Remove all tags using sentinel value [0]","value":{"tags":[0]}},"CreateExternalMetadata":{"title":"CreateExternalMetadata","description":"Attach external source metadata to a document that has none yet. `external_id` is required for creation. `external_metadata` must be sent as a JSON string when using multipart/form-data.","value":{"external_metadata":{"external_id":"gitlab-issue-456","doc_type":"gitlab_issue","additional_metadata":{"external_url":"https://gitlab.example.com/project/-/issues/456","name":"Fix authentication bug"}}}},"UpdateExistingExternalMetadata":{"title":"UpdateExistingExternalMetadata","description":"Update fields on an existing external metadata record. `external_id` is optional when a record already exists — it will be preserved if omitted. Fields inside `additional_metadata` are merged with existing values, not replaced.","value":{"external_metadata":{"additional_metadata":{"last_synced_at":"2024-01-15T10:00:00Z","name":"Updated Name"}}}},"ReplaceTheFile":{"title":"ReplaceTheFile","description":"Send a new original as the `file` part of a multipart request. The document keeps its id, title, manual tags, facets and external metadata, and is re-ingested from the new content. Until re-ingestion begins it still serves its previous file.","value":{"file":"(binary file data)"}},"ReplaceTheFileAndRenameTheDocument":{"title":"ReplaceTheFileAndRenameTheDocument","description":"Metadata changes apply immediately; the file is queued for re-ingestion. The document `title` is only ever changed when explicitly provided — it never follows the new file's name.","value":{"file":"(binary file data)","title":"Q4 Report (revised)"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"969a4bc3-c043-4b83-acb7-063cae23b8fd":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"isRequired":true,"uniqueKey":"id","typeLabel":"integer"},"filename":{"type":"string","readOnly":true,"description":"Filename of the document","isRequired":true,"uniqueKey":"filename","typeLabel":"string"},"workspace":{"oneOf":[{"type":"object","description":"Workspace the document belongs to","required":["id","name","workspace_type"],"properties":{"id":{"type":"integer","description":"Workspace ID","isRequired":true,"uniqueKey":"workspace.oneOf.0.id","typeLabel":"integer"},"name":{"type":"string","description":"Workspace name","isRequired":true,"uniqueKey":"workspace.oneOf.0.name","typeLabel":"string"},"workspace_type":{"type":"string","description":"Workspace type (shared or personal)","isRequired":true,"uniqueKey":"workspace.oneOf.0.workspace_type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"workspace.oneOf.0","typeLabel":"object"},{"type":"null","description":"Workspace the document belongs to","isRequired":true,"uniqueKey":"workspace.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"workspace","typeLabel":"object | null"},"summaries":{"type":"array","items":{"type":"object","properties":{"summary":{"type":"string","description":"Summary of the document.","isRequired":true,"uniqueKey":"summaries.items.[INDEX].summary","typeLabel":"string"},"language":{"type":"string","description":"Language of the summary.\n\n* `en` - English\n* `fr` - French\n* `es` - Spanish\n* `it` - Italian\n* `ar` - Arabic\n* `nl` - Dutch\n* `sv` - Swedish\n* `de` - German\n* `ja` - Japanese\n* `zh` - Chinese\n* `ko` - Korean","enum":["en","fr","es","it","ar","nl","sv","de","ja","zh","ko"],"uniqueKey":"summaries.items.[INDEX].language","typeLabel":"enum\u003cstring>"}},"required":["summary"],"uniqueKey":"summaries.items.[INDEX]","typeLabel":"object"},"readOnly":true,"description":"Document summaries (all languages)","isRequired":true,"uniqueKey":"summaries","typeLabel":"object[]"},"extension":{"type":"string","description":"File extension of the document","isRequired":true,"uniqueKey":"extension","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","description":"Creation date of the resource","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","readOnly":true,"isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"total_pages":{"type":"integer","readOnly":true,"description":"Total number of pages","isRequired":true,"uniqueKey":"total_pages","typeLabel":"integer"},"tags":{"type":"array","items":{"type":"object","description":"Serializer for tag items in file list response.","properties":{"id":{"type":"integer","description":"Tag ID","isRequired":true,"uniqueKey":"tags.items.[INDEX].id","typeLabel":"integer"},"name":{"type":"string","description":"Tag name","isRequired":true,"uniqueKey":"tags.items.[INDEX].name","typeLabel":"string"},"auto_assigned":{"type":"boolean","description":"True if this tag was automatically assigned by the system, False if manually assigned by a user","isRequired":true,"uniqueKey":"tags.items.[INDEX].auto_assigned","typeLabel":"boolean"}},"required":["auto_assigned","id","name"],"uniqueKey":"tags.items.[INDEX]","typeLabel":"object"},"readOnly":true,"description":"List of tags associated with the document","isRequired":true,"uniqueKey":"tags","typeLabel":"object[]"},"created_by":{"oneOf":[{"type":"object","description":"User who created the file. Null when the file was created by the system.","required":["first_name","id","last_name","username"],"properties":{"id":{"type":"integer","description":"User ID","isRequired":true,"uniqueKey":"created_by.oneOf.0.id","typeLabel":"integer"},"first_name":{"type":"string","description":"First name","isRequired":true,"uniqueKey":"created_by.oneOf.0.first_name","typeLabel":"string"},"last_name":{"type":"string","description":"Last name","isRequired":true,"uniqueKey":"created_by.oneOf.0.last_name","typeLabel":"string"},"username":{"type":"string","description":"Username","isRequired":true,"uniqueKey":"created_by.oneOf.0.username","typeLabel":"string"}},"isRequired":true,"uniqueKey":"created_by.oneOf.0","typeLabel":"object"},{"type":"null","description":"User who created the file. Null when the file was created by the system.","isRequired":true,"uniqueKey":"created_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"created_by","typeLabel":"object | null"},"upload_session_uuid":{"oneOf":[{"type":"string","format":"uuid","readOnly":true,"description":"Upload session UUID associated with this document","isRequired":true,"uniqueKey":"upload_session_uuid.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","readOnly":true,"description":"Upload session UUID associated with this document","isRequired":true,"uniqueKey":"upload_session_uuid.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"upload_session_uuid","typeLabel":"string\u003cuuid> | null"},"signature":{"oneOf":[{"type":"string","readOnly":true,"description":"TLSH hash for duplicate detection.","isRequired":true,"uniqueKey":"signature.oneOf.0","typeLabel":"string"},{"type":"null","readOnly":true,"description":"TLSH hash for duplicate detection.","isRequired":true,"uniqueKey":"signature.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"signature","typeLabel":"string | null"},"content_types":{"type":"array","items":{"type":"object","description":"OpenAPI schema for compact content type response (Tier 1 — list default).","properties":{"path":{"type":"string","description":"Colon-separated content type path (e.g. legal:contract:nda)","isRequired":true,"uniqueKey":"content_types.items.[INDEX].path","typeLabel":"string"},"label":{"type":"string","description":"User-readable label (leaf node)","isRequired":true,"uniqueKey":"content_types.items.[INDEX].label","typeLabel":"string"},"attribute_values":{"type":"object","additionalProperties":{"type":"object","description":"OpenAPI schema for a compact attribute value entry.","properties":{"value":{"description":"Attribute value (type depends on attribute definition)","isRequired":true,"uniqueKey":"content_types.items.[INDEX].attribute_values.additionalProperties.value","typeLabel":"any"},"type":{"type":"string","description":"Attribute type (text, number, date, boolean, select, multi_select)","isRequired":true,"uniqueKey":"content_types.items.[INDEX].attribute_values.additionalProperties.type","typeLabel":"string"},"label":{"type":"string","description":"User-readable attribute label (present when include_details=true)","uniqueKey":"content_types.items.[INDEX].attribute_values.additionalProperties.label","typeLabel":"string"}},"required":["type","value"],"uniqueKey":"content_types.items.[INDEX].attribute_values.additionalProperties","typeLabel":"object"},"description":"Map of attribute name to {value, type}. Only present when include_details=true.","uniqueKey":"content_types.items.[INDEX].attribute_values","typeLabel":"object"}},"required":["label","path"],"uniqueKey":"content_types.items.[INDEX]","typeLabel":"object"},"readOnly":true,"description":"Facet content types with nested attribute values. Excludable via ?exclude=content_types.","isRequired":true,"uniqueKey":"content_types","typeLabel":"object[]"},"thumbnail":{"type":"object","description":"Thumbnail preview of the document (256x256 WebP).","required":["status","url"],"properties":{"status":{"type":"string","description":"Thumbnail generation status: MISSING (not available), PROCESSING (being generated), READY (available)\n\n* `MISSING` - MISSING\n* `PROCESSING` - PROCESSING\n* `READY` - READY","enum":["MISSING","PROCESSING","READY"],"isRequired":true,"uniqueKey":"thumbnail.status","typeLabel":"enum\u003cstring>"},"url":{"oneOf":[{"type":"string","description":"Relative URL to the thumbnail image (WebP, 256x256). Null when status is not READY.","isRequired":true,"uniqueKey":"thumbnail.url.oneOf.0","typeLabel":"string"},{"type":"null","description":"Relative URL to the thumbnail image (WebP, 256x256). Null when status is not READY.","isRequired":true,"uniqueKey":"thumbnail.url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"thumbnail.url","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"thumbnail","typeLabel":"object"},"pending_reprocess":{"oneOf":[{"type":"string","description":"The reprocessing level queued for this document, or null when none is. Non-null means work has been accepted but has not started yet — `status` and `status_vision` still describe the previous run. It clears the moment processing starts, from which point the statuses track the new run. `update` (a file replacement) additionally leaves the file-derived fields (`filename`, `extension`, `size`, `total_pages`, `signature`, `summaries`, `content`) describing the previous file until then.","enum":["reparse","rechunk","reembed","reembed_vision","update"],"isRequired":true,"uniqueKey":"pending_reprocess.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The reprocessing level queued for this document, or null when none is. Non-null means work has been accepted but has not started yet — `status` and `status_vision` still describe the previous run. It clears the moment processing starts, from which point the statuses track the new run. `update` (a file replacement) additionally leaves the file-derived fields (`filename`, `extension`, `size`, `total_pages`, `signature`, `summaries`, `content`) describing the previous file until then.","isRequired":true,"uniqueKey":"pending_reprocess.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pending_reprocess","typeLabel":"enum\u003cstring> | null"},"title":{"oneOf":[{"type":"string","maxLength":255,"uniqueKey":"title.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":255,"uniqueKey":"title.oneOf.1","typeLabel":"null"}],"uniqueKey":"title","typeLabel":"string | null"},"status":{"enum":["pending","pending_conversion","converting","parsing","parsing_failed","embedding","embedding_failed","embedded","parsed","fail","updating"],"type":"string","description":"* `pending` - Pending\n* `pending_conversion` - Pending Conversion\n* `converting` - Converting\n* `parsing` - Parsing\n* `parsing_failed` - Parsing Failed\n* `embedding` - Embedding\n* `embedding_failed` - Embedding Failed\n* `embedded` - Embedded\n* `parsed` - Parsed\n* `fail` - Fail\n* `updating` - Updating","uniqueKey":"status","typeLabel":"enum\u003cstring>"},"status_vision":{"enum":["pending","processing","embedded","fail","-"],"type":"string","description":"* `pending` - Pending\n* `processing` - Processing\n* `embedded` - Embedded\n* `fail` - Fail\n* `-` - Not available","uniqueKey":"status_vision","typeLabel":"enum\u003cstring>"},"size":{"oneOf":[{"type":"integer","readOnly":true,"description":"Size of the file in bytes.","uniqueKey":"size.oneOf.0","typeLabel":"integer"},{"type":"null","readOnly":true,"description":"Size of the file in bytes.","uniqueKey":"size.oneOf.1","typeLabel":"null"}],"uniqueKey":"size","typeLabel":"integer | null"},"content":{"oneOf":[{"type":"string","deprecated":true,"readOnly":true,"description":"Deprecated — use `pages[]` instead. Full text content of the document, derived from per-page text, as a single flat string. Only included when include_content=true query parameter is provided. Will be removed in a future release.","uniqueKey":"content.oneOf.0","typeLabel":"string"},{"type":"null","deprecated":true,"readOnly":true,"description":"Deprecated — use `pages[]` instead. Full text content of the document, derived from per-page text, as a single flat string. Only included when include_content=true query parameter is provided. Will be removed in a future release.","uniqueKey":"content.oneOf.1","typeLabel":"null"}],"uniqueKey":"content","typeLabel":"string | null"},"pages":{"type":"array","items":{"type":"object","description":"Canonical per-page document text object.\n\nOriginates with /parse and is reused by /ocr and /files (the latter imports it\nfrom here) so a client can switch between live parsing and reading an\nalready-ingested file without reshaping page data. Defined once and reused\neverywhere — never redefine this shape per app.\n\nExtensible: future per-page fields (tables, images, confidence, ...) can be\nadded here without breaking callers that only consume ``index`` + ``markdown``.","properties":{"index":{"type":"integer","description":"Page number within the document (1-based).","isRequired":true,"uniqueKey":"pages.items.[INDEX].index","typeLabel":"integer"},"markdown":{"type":"string","description":"Page text rendered as Markdown.","isRequired":true,"uniqueKey":"pages.items.[INDEX].markdown","typeLabel":"string"}},"required":["index","markdown"],"uniqueKey":"pages.items.[INDEX]","typeLabel":"object"},"readOnly":true,"description":"Per-page document text in the canonical `{ index, markdown }` shape shared with /parse and /ocr. Only included when include_content=true. Intended replacement for the flat `content` string. For documents ingested before per-page text was stored, the full `content` is returned as a single page (index 1); empty only when there is no content at all.","uniqueKey":"pages","typeLabel":"object[]"},"status_detail":{"oneOf":[{"type":"string","description":"Detailed error information. Only present when document processing has failed.","uniqueKey":"status_detail.oneOf.0","typeLabel":"string"},{"type":"null","description":"Detailed error information. Only present when document processing has failed.","uniqueKey":"status_detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"status_detail","typeLabel":"string | null"},"parser":{"oneOf":[{"type":"string","description":"Parser/ingestion pipeline used for document processing (e.g., 'v2.1', 'v3.0'). ","uniqueKey":"parser.oneOf.0","typeLabel":"string"},{"type":"null","description":"Parser/ingestion pipeline used for document processing (e.g., 'v2.1', 'v3.0'). ","uniqueKey":"parser.oneOf.1","typeLabel":"null"}],"uniqueKey":"parser","typeLabel":"string | null"},"external_metadata":{"oneOf":[{"type":"object","description":"External document metadata","required":["additional_metadata","doc_type","external_id"],"properties":{"external_id":{"type":"string","description":"External document ID","isRequired":true,"uniqueKey":"external_metadata.oneOf.0.external_id","typeLabel":"string"},"doc_type":{"type":"string","description":"External document type","isRequired":true,"uniqueKey":"external_metadata.oneOf.0.doc_type","typeLabel":"string"},"additional_metadata":{"description":"Additional metadata associated with the document","isRequired":true,"uniqueKey":"external_metadata.oneOf.0.additional_metadata","typeLabel":"any"}},"uniqueKey":"external_metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"External document metadata","uniqueKey":"external_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"external_metadata","typeLabel":"object | null"}},"required":["content_types","created_at","created_by","extension","filename","id","pending_reprocess","signature","summaries","tags","thumbnail","total_pages","updated_at","upload_session_uuid","workspace"],"uniqueKey":"","typeLabel":"object"},"examples":{"FileUpdatedSuccessfully":{"title":"FileUpdatedSuccessfully","value":{"id":123,"filename":"project_proposal.pdf","workspace":{"id":1,"name":"Engineering Team"},"summaries":[{"language":"en","summary":"This document outlines Q4 initiatives..."}],"title":"Updated Document Title","extension":"pdf","status":"embedded","status_vision":"embedded","created_at":"2024-01-15T10:30:00Z","updated_at":"2024-01-15T11:45:00Z","total_pages":25,"size":2458624,"tags":[{"id":1,"name":"Compliance","auto_assigned":false}],"created_by":{"id":42,"first_name":"Jane","last_name":"Doe","username":"jdoe"},"signature":"T1A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1V2W3X4Y5Z6A7B8C9D0E1F2","parser":"v2.2.1","external_metadata":null,"content_types":[{"code":"design-doc","path":"tech:specification:design-doc","label":"Design Document","breadcrumb":[{"code":"tech","path":"tech","label":"Tech"},{"code":"specification","path":"tech:specification","label":"Specification"},{"code":"design-doc","path":"tech:specification:design-doc","label":"Design Document"}],"attribute_values":{"owner_team":{"value":"Platform Engineering","type":"text","attribute":{"name":"owner_team","label":"Owner Team","type":"text","required":true}},"maturity":{"value":"Approved","type":"select","attribute":{"name":"maturity","label":"Maturity","type":"select","required":false,"choices":["Draft","Review","Approved"]}},"component":{"value":"Document Retrieval Service","type":"text","attribute":{"name":"component","label":"Component","type":"text","required":false}}}}],"pending_reprocess":null}},"FileReplacementQueued":{"title":"FileReplacementQueued","description":"A request including `file`. Every file-derived field still describes the previous file — `pending_reprocess: update` is what says the new one has not been processed yet. Classification survives the replacement: `content_types` and their attribute values are returned unchanged.","value":{"id":123,"filename":"project_proposal.pdf","workspace":{"id":1,"name":"Engineering Team"},"summaries":[{"language":"en","summary":"This document outlines Q4 initiatives..."}],"title":"Project Proposal","extension":"pdf","status":"embedded","status_vision":"embedded","created_at":"2024-01-15T10:30:00Z","updated_at":"2024-01-15T11:45:00Z","total_pages":25,"size":2458624,"tags":[],"created_by":{"id":42,"first_name":"Jane","last_name":"Doe","username":"jdoe"},"external_metadata":null,"content_types":[{"code":"annual-report","path":"finance:reporting:annual-report","label":"Annual Report","breadcrumb":[{"code":"finance","path":"finance","label":"Finance"},{"code":"reporting","path":"finance:reporting","label":"Reporting"},{"code":"annual-report","path":"finance:reporting:annual-report","label":"Annual Report"}],"attribute_values":{"fiscal_year":{"value":2024,"type":"number","attribute":{"name":"fiscal_year","label":"Fiscal Year","type":"number","required":true}},"entity":{"value":"LightOn SA","type":"text","attribute":{"name":"entity","label":"Entity","type":"text","required":false}}}}],"pending_reprocess":"update"}},"FileUpdatedWithExternalMetadata":{"title":"FileUpdatedWithExternalMetadata","value":{"id":124,"filename":"customer_nda.pdf","workspace":{"id":3,"name":"Legal Team"},"summaries":[],"title":"Customer NDA","extension":"pdf","status":"embedded","status_vision":"embedded","created_at":"2024-01-15T10:30:00Z","updated_at":"2024-01-15T11:45:00Z","total_pages":3,"size":102400,"tags":[],"created_by":{"id":42,"first_name":"Jane","last_name":"Doe","username":"jdoe"},"signature":"T1A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1V2W3X4Y5Z6A7B8C9D0E1F2","external_metadata":{"external_id":"legal-doc-456789","doc_type":"nda","additional_metadata":{"external_url":"https://contracts.example.com/legal/customer-nda","last_synced_at":"2024-01-15T10:00:00Z"}},"content_types":[{"code":"nda","path":"legal:contract:nda","label":"Non-Disclosure Agreement","breadcrumb":[{"code":"legal","path":"legal","label":"Legal"},{"code":"contract","path":"legal:contract","label":"Contract"},{"code":"nda","path":"legal:contract:nda","label":"Non-Disclosure Agreement"}],"attribute_values":{"jurisdiction":{"value":["FR","US"],"type":"multi-select","attribute":{"name":"jurisdiction","label":"Jurisdiction","type":"multi-select","required":true,"choices":["FR","US","UK","DE"]}},"confidentiality_level":{"value":"Confidential","type":"select","attribute":{"name":"confidentiality_level","label":"Confidentiality Level","type":"select","required":false,"choices":["Public","Internal","Confidential"]}},"counterparty":{"value":"Nimbus Labs","type":"text","attribute":{"name":"counterparty","label":"Counterparty","type":"text","required":false}},"is_mutual":{"value":true,"type":"boolean","attribute":{"name":"is_mutual","label":"Is Mutual","type":"boolean","required":false}}}}],"pending_reprocess":null}}},"exampleType":"examples"}},"description":"File updated successfully","exampleType":"examples"},"19c92e2b-fe4f-4842-ae5e-2757dde67c82":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"StorageQuotaExceeded":{"title":"StorageQuotaExceeded","value":{"id":null,"code":400,"error":"STORAGE_LIMIT_REACHED","detail":"The custom workspace storage limit for your company is 10240 MB and you are currently using 10230.5 MB. Delete stale documents or ask your company admin to request an increase of your storage quota.","doc_url":"https://developers.lighton.ai/errors#bad_request"}}},"exampleType":"examples"}},"description":"Domain rules rejected the update: the workspace only accepts synced documents, the company storage quota does not cover the size increase, or the request changes the `external_id` of a datasource-imported document.","exampleType":"examples"},"aba97f8f-1a5d-4cf1-985e-184269955521":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"Unauthorized":{"title":"Unauthorized","value":{"id":null,"code":401,"error":"unauthorized","detail":"Authentication credentials were not provided or are invalid.","doc_url":"https://developers.lighton.ai/errors#unauthorized"}}},"exampleType":"examples"}},"description":"Authentication credentials were not provided or are invalid","exampleType":"examples"},"88c07287-3c98-44b2-a14e-f8dd503bedcd":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","code":123,"error":"\u003cstring>","detail":"\u003cstring>","doc_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Editing is not permitted, or — when replacing the file — the caller has no owner/editor role in the document's workspace.","exampleType":"generated"},"d9581688-eacb-4784-adf7-634a1cb1a68f":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"NotFound":{"title":"NotFound","value":{"id":null,"code":404,"error":"not_found","detail":"The requested resource was not found.","doc_url":"https://developers.lighton.ai/errors#not_found"}}},"exampleType":"examples"}},"description":"The requested resource was not found","exampleType":"examples"},"c454e83c-ce9d-4639-a569-3584acab18b8":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Job/resource id when one already exists (useful for async error diagnosis); null otherwise.","isRequired":true,"uniqueKey":"id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"id","typeLabel":"string | null"},"code":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"error":{"type":"string","description":"Error code used by the UI as a translation key","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable error message for developers","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"doc_url":{"type":"string","description":"Link to the error-code documentation page","isRequired":true,"uniqueKey":"doc_url","typeLabel":"string"},"fields":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"error":{"type":"string","description":"Error code / translation key","isRequired":true,"uniqueKey":"fields.additionalProperties.items.[INDEX].error","typeLabel":"string"},"detail":{"type":"string","description":"Human-readable description of the field error","isRequired":true,"uniqueKey":"fields.additionalProperties.items.[INDEX].detail","typeLabel":"string"}},"required":["detail","error"],"uniqueKey":"fields.additionalProperties.items.[INDEX]","typeLabel":"object"},"uniqueKey":"fields.additionalProperties","typeLabel":"object[]"},"description":"Field-level validation errors keyed by field name","uniqueKey":"fields","typeLabel":"object"}},"required":["code","detail","doc_url","error","id"],"uniqueKey":"","typeLabel":"object"},"examples":{"ValidationError":{"title":"ValidationError","value":{"id":null,"code":422,"error":"validation_error","detail":"One or more fields failed validation.","doc_url":"https://developers.lighton.ai/errors#validation_error","fields":{"\u003cfield_name>":[{"error":"required","detail":"This field is required."}]}}}},"exampleType":"examples"}},"description":"Request body is valid JSON but one or more fields failed validation","exampleType":"examples"},"ce78c8ad-59e6-40e1-a820-6b854ad67d00":{"description":"API is under maintenance. Check `GET /api/v3/system/status` for active periods and retry.","content":{"application/json":{"schema":{"type":"object","description":"Returned by the maintenance middleware when the requested endpoint is blocked.","required":["detail","error","mode"],"properties":{"detail":{"type":"string","example":"System is under maintenance.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"error":{"type":"string","example":"service_maintenance","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"mode":{"type":"string","enum":["full_shutdown","warning_banner"],"description":"`full_shutdown` blocks all traffic; `warning_banner` also blocks and shows a dismissible toast.","isRequired":true,"uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","description":"Operator-supplied maintenance reason, if any.","uniqueKey":"reason","typeLabel":"string"},"started_at":{"type":"string","format":"date-time","uniqueKey":"started_at","typeLabel":"string\u003cdate-time>"},"endpoint_category_names":{"type":"array","items":{"type":"string","uniqueKey":"endpoint_category_names.items.[INDEX]","typeLabel":"string"},"description":"Non-empty only for category-scoped periods. Empty means all endpoints are affected.","uniqueKey":"endpoint_category_names","typeLabel":"string[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"detail":"System is under maintenance.","error":"service_maintenance","mode":"full_shutdown","reason":"\u003cstring>","started_at":"2023-11-07T05:31:56Z","endpoint_category_names":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"cfc071e2-2ffe-497a-b797-0e4a9769f867":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","scopes":[]}}},"servers":{"48c3fa0c-537e-4ab8-b62c-fc02ab11f431":{"url":"https://api.lighton.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/api-console.yaml"},"subdomain":"lighton-developers","siteName":"LightOn Developers","title":"Update file metadata or replace its file - LightOn Developers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-16T07:50:02.703Z","originalFileLocation":"api-reference/files/update-file-metadata-or-replace-its-file.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Update mutable fields of a file (document). Updatable fields: - title: Update the document title - tags: Replace ALL tags for the document (both manual and auto-assigned) - external_metadata: Create or update external source metadata - file: Replace the original file and re-ingest the document Tag replacement behavior: - Providing a tags array replaces ALL existing tags (manual and auto-assigned) - To remove all tags, send [0] (sentinel value for multipart format) - Omitting tags field leaves tags unchanged - New tags are marked as manually assigned (auto_assigned=False) External metadata behavior: - When creating for the first time, external_id is required - When updating existing metadata, external_id is optional (existing value is preserved) - Fields in additional_metadata are merged (not replaced) with existing values - external_id cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. doc_type and additional_metadata stay editable File replacement behavior: - The document keeps its id, title, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt. - Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file. - Replacing the file additionally requires an owner or editor role in the document\u0026#x27;s workspace, and is not available in workspaces configured for synced documents. - The storage quota is checked on the size difference, not the full new size. - file can be combined with title, tags and external_metadata in the same request: the metadata changes apply immediately, the file is queued. - The response reflects the document as it still is: filename, extension, size, total_pages, status, signature, summaries and content describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts. - pending_reprocess is set to update on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: status still reports the previous run\u0026#x27;s outcome (typically Embedded) until the pipeline picks the document up. Poll until pending_reprocess is null and status is terminal — treating a terminal status alone as completion reports success against the previous file. - Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live. - Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. download?purpose=rendered_pdf serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on status rather than on the download succeeding. - The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything. Public datasets: editing a public-dataset file requires the instance-admin MANAGE_PUBLIC_DATASET permission. A workspace-scoped API key with read access (company opted in via allow_access_to_public_datasets) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LightOn Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update file metadata or replace its file - LightOn Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Update mutable fields of a file (document). Updatable fields: - title: Update the document title - tags: Replace ALL tags for the document (both manual and auto-assigned) - external_metadata: Create or update external source metadata - file: Replace the original file and re-ingest the document Tag replacement behavior: - Providing a tags array replaces ALL existing tags (manual and auto-assigned) - To remove all tags, send [0] (sentinel value for multipart format) - Omitting tags field leaves tags unchanged - New tags are marked as manually assigned (auto_assigned=False) External metadata behavior: - When creating for the first time, external_id is required - When updating existing metadata, external_id is optional (existing value is preserved) - Fields in additional_metadata are merged (not replaced) with existing values - external_id cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. doc_type and additional_metadata stay editable File replacement behavior: - The document keeps its id, title, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt. - Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file. - Replacing the file additionally requires an owner or editor role in the document\u0026#x27;s workspace, and is not available in workspaces configured for synced documents. - The storage quota is checked on the size difference, not the full new size. - file can be combined with title, tags and external_metadata in the same request: the metadata changes apply immediately, the file is queued. - The response reflects the document as it still is: filename, extension, size, total_pages, status, signature, summaries and content describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts. - pending_reprocess is set to update on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: status still reports the previous run\u0026#x27;s outcome (typically Embedded) until the pipeline picks the document up. Poll until pending_reprocess is null and status is terminal — treating a terminal status alone as completion reports success against the previous file. - Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live. - Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. download?purpose=rendered_pdf serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on status rather than on the download succeeding. - The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything. Public datasets: editing a public-dataset file requires the instance-admin MANAGE_PUBLIC_DATASET permission. A workspace-scoped API key with read access (company opted in via allow_access_to_public_datasets) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LightOn Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lighton-developers.mintlify.site/_mintlify/api/og/v2?division=Files\u0026amp;title=Update+file+metadata+or+replace+its+file\u0026amp;description=Update+mutable+fields+of+a+file+%28document%29.%0A%0A**Updatable+fields%3A**%0A-+%60title%60%3A+Update+the+document+title%0A-+%60tags%60%3A+Replace+ALL+tags+for+the+document+%28both+manual\u0026amp;theme=42de0de5beb070a7d2770d17\u0026amp;signature=79d50c1ffcd3dcbc7432ee1402b6fa9710d17400ce404775b55855ec9523db2e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update file metadata or replace its file - LightOn Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Update mutable fields of a file (document). Updatable fields: - title: Update the document title - tags: Replace ALL tags for the document (both manual and auto-assigned) - external_metadata: Create or update external source metadata - file: Replace the original file and re-ingest the document Tag replacement behavior: - Providing a tags array replaces ALL existing tags (manual and auto-assigned) - To remove all tags, send [0] (sentinel value for multipart format) - Omitting tags field leaves tags unchanged - New tags are marked as manually assigned (auto_assigned=False) External metadata behavior: - When creating for the first time, external_id is required - When updating existing metadata, external_id is optional (existing value is preserved) - Fields in additional_metadata are merged (not replaced) with existing values - external_id cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. doc_type and additional_metadata stay editable File replacement behavior: - The document keeps its id, title, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt. - Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file. - Replacing the file additionally requires an owner or editor role in the document\u0026#x27;s workspace, and is not available in workspaces configured for synced documents. - The storage quota is checked on the size difference, not the full new size. - file can be combined with title, tags and external_metadata in the same request: the metadata changes apply immediately, the file is queued. - The response reflects the document as it still is: filename, extension, size, total_pages, status, signature, summaries and content describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts. - pending_reprocess is set to update on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: status still reports the previous run\u0026#x27;s outcome (typically Embedded) until the pipeline picks the document up. Poll until pending_reprocess is null and status is terminal — treating a terminal status alone as completion reports success against the previous file. - Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live. - Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. download?purpose=rendered_pdf serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on status rather than on the download succeeding. - The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything. Public datasets: editing a public-dataset file requires the instance-admin MANAGE_PUBLIC_DATASET permission. A workspace-scoped API key with read access (company opted in via allow_access_to_public_datasets) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lighton-developers.mintlify.site/_mintlify/api/og/v2?division=Files\u0026amp;title=Update+file+metadata+or+replace+its+file\u0026amp;description=Update+mutable+fields+of+a+file+%28document%29.%0A%0A**Updatable+fields%3A**%0A-+%60title%60%3A+Update+the+document+title%0A-+%60tags%60%3A+Replace+ALL+tags+for+the+document+%28both+manual\u0026amp;theme=42de0de5beb070a7d2770d17\u0026amp;signature=79d50c1ffcd3dcbc7432ee1402b6fa9710d17400ce404775b55855ec9523db2e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/lighton-developers/2Zh9Mbvo5QQal47m/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LightOn Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1f99bb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/files/update-file-metadata-or-replace-its-file.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.lighton.ai/#organization\",\"name\":\"LightOn Developers\",\"url\":\"https://developers.lighton.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lighton-developers/dojq_qF_vSGGGm4-/logo/light.svg?fit=max\u0026auto=format\u0026n=dojq_qF_vSGGGm4-\u0026q=85\u0026s=345d3b10124f99971a7737a9f06f2886\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.lighton.ai#website\",\"name\":\"LightOn Developers\",\"url\":\"https://developers.lighton.ai\",\"publisher\":{\"@id\":\"https://developers.lighton.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file#webpage\",\"url\":\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file\",\"name\":\"Update file metadata or replace its file\",\"description\":\"Update mutable fields of a file (document). Updatable fields: - title: Update the document title - tags: Replace ALL tags for the document (both manual and auto-assigned) - external_metadata: Create or update external source metadata - file: Replace the original file and re-ingest the document Tag replacement behavior: - Providing a tags array replaces ALL existing tags (manual and auto-assigned) - To remove all tags, send [0] (sentinel value for multipart format) - Omitting tags field leaves tags unchanged - New tags are marked as manually assigned (auto_assigned=False) External metadata behavior: - When creating for the first time, external_id is required - When updating existing metadata, external_id is optional (existing value is preserved) - Fields in additional_metadata are merged (not replaced) with existing values - external_id cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. doc_type and additional_metadata stay editable File replacement behavior: - The document keeps its id, title, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt. - Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file. - Replacing the file additionally requires an owner or editor role in the document's workspace, and is not available in workspaces configured for synced documents. - The storage quota is checked on the size difference, not the full new size. - file can be combined with title, tags and external_metadata in the same request: the metadata changes apply immediately, the file is queued. - The response reflects the document as it still is: filename, extension, size, total_pages, status, signature, summaries and content describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts. - pending_reprocess is set to update on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: status still reports the previous run's outcome (typically Embedded) until the pipeline picks the document up. Poll until pending_reprocess is null and status is terminal — treating a terminal status alone as completion reports success against the previous file. - Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live. - Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. download?purpose=rendered_pdf serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on status rather than on the download succeeding. - The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything. Public datasets: editing a public-dataset file requires the instance-admin MANAGE_PUBLIC_DATASET permission. A workspace-scoped API key with read access (company opted in via allow_access_to_public_datasets) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\",\"dateModified\":\"2026-09-16T07:50:02.703Z\",\"isPartOf\":{\"@id\":\"https://developers.lighton.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Intelligence\",\"item\":\"https://developers.lighton.ai/api-reference/ask/ask-a-question-over-your-documents\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Files\",\"item\":\"https://developers.lighton.ai/api-reference/files/list-files-accessible-to-the-authenticated-user\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update file metadata or replace its file\",\"item\":\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file#apireference\",\"headline\":\"Update file metadata or replace its file\",\"name\":\"Update file metadata or replace its file\",\"description\":\"Update mutable fields of a file (document). Updatable fields: - title: Update the document title - tags: Replace ALL tags for the document (both manual and auto-assigned) - external_metadata: Create or update external source metadata - file: Replace the original file and re-ingest the document Tag replacement behavior: - Providing a tags array replaces ALL existing tags (manual and auto-assigned) - To remove all tags, send [0] (sentinel value for multipart format) - Omitting tags field leaves tags unchanged - New tags are marked as manually assigned (auto_assigned=False) External metadata behavior: - When creating for the first time, external_id is required - When updating existing metadata, external_id is optional (existing value is preserved) - Fields in additional_metadata are merged (not replaced) with existing values - external_id cannot be changed on a document imported from a datasource: the sync matches its documents on it, so a rename would detach the document from its source. doc_type and additional_metadata stay editable File replacement behavior: - The document keeps its id, title, manually assigned tags, content types, attribute values and external metadata. Only the file and everything derived from it (text, chunks, embeddings, auto-assigned tags, summaries) are rebuilt. - Any supported file type is accepted, including one that differs from the current file — the processing statuses are re-derived from the new file. - Replacing the file additionally requires an owner or editor role in the document's workspace, and is not available in workspaces configured for synced documents. - The storage quota is checked on the size difference, not the full new size. - file can be combined with title, tags and external_metadata in the same request: the metadata changes apply immediately, the file is queued. - The response reflects the document as it still is: filename, extension, size, total_pages, status, signature, summaries and content describe the previous file until re-ingestion begins. The document keeps serving its previous content — search, extracts and download stay consistent — and leaves the search index only once processing actually starts. - pending_reprocess is set to update on the response and on subsequent reads, and is the only signal that the queued file has not been processed yet: status still reports the previous run's outcome (typically Embedded) until the pipeline picks the document up. Poll until pending_reprocess is null and status is terminal — treating a terminal status alone as completion reports success against the previous file. - Sending a new file while one is already queued replaces the queued file, and a file replacement supersedes any other reprocessing already queued for the document: the most recent request is always the one that goes live. - Once re-ingestion starts, a document whose new file needs rendering has no rendered PDF until conversion completes. download?purpose=rendered_pdf serves the original during that window, as it does for any file still being converted, so a viewer can receive a non-PDF body. Gate the viewer on status rather than on the download succeeding. - The request is applied in full or not at all: tags are validated before the file is queued, so an invalid tag id rejects the whole request without staging anything. Public datasets: editing a public-dataset file requires the instance-admin MANAGE_PUBLIC_DATASET permission. A workspace-scoped API key with read access (company opted in via allow_access_to_public_datasets) can see a public-dataset file but is refused permission to edit it — public datasets are read-only.\",\"url\":\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file\",\"mainEntityOfPage\":{\"@id\":\"https://developers.lighton.ai/api-reference/files/update-file-metadata-or-replace-its-file#webpage\"},\"dateModified\":\"2026-09-16T07:50:02.703Z\",\"publisher\":{\"@id\":\"https://developers.lighton.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.lighton.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LightOn Developers\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"LightOn Developers\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/files/update-file-metadata-or-replace-its-file.md","siteName":"LightOn Developers","nav":{"global":{"anchors":[{"anchor":"Playground","icon":"circle-play","href":"https://console.lighton.ai"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/introduction"},{"title":"API Errors","href":"/api-reference/v3-error-codes"}]},{"group":"Intelligence","pages":[{"title":"Ask a question over your documents","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/ask","href":"/api-reference/ask/ask-a-question-over-your-documents"},{"title":"Search document chunks","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/search","href":"/api-reference/search/search-document-chunks"},{"group":"Files","pages":[{"title":"List files accessible to the authenticated user","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files","href":"/api-reference/files/list-files-accessible-to-the-authenticated-user"},{"title":"Upload a file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files","href":"/api-reference/files/upload-a-file"},{"title":"Delete multiple files in a single request","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files/bulk-delete","href":"/api-reference/files/delete-multiple-files-in-a-single-request"},{"title":"Retrieve a single file by ID","description":"Retrieve detailed information for a single file by its ID.\nOnly files that the authenticated user is authorized to access will be returned.\nReturns 404 if the file does not exist or the user does not have access.\n\nQuery Parameters:\n- include_content: Set to 'true' to include the full text content of the document (default: false)\n\nThe response includes comprehensive document details including:\n- Basic metadata (id, filename, title, extension, dates, page count)\n- Full text content of the document (only when include_content=true)\n- Processing status (status, status_vision, status_detail if failed)\n- Associated tags and workspace information\n- File size (if available)\n- Parser/ingestion pipeline (if available, after parsing starts)\n- Signature (TLSH hash for duplicate detection)\n- Facet content types and nested attribute values (full expanded with attribute definitions)\n\n**Public datasets:** reachable by instance admins (`MANAGE_PUBLIC_DATASET`) unconditionally,\nand by a company that has opted in (`allow_access_to_public_datasets`) with a\nworkspace-scoped API key granting the file's public workspace.","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files/{id}","href":"/api-reference/files/retrieve-a-single-file-by-id"},{"title":"Update file metadata or replace its file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/files/{id}","href":"/api-reference/files/update-file-metadata-or-replace-its-file"},{"title":"Delete a file","description":"Permanently delete a file and all associated data.\n\n**Requirements:**\n- Delete permission on the document\n- Workspace must allow manual document management (not sync-only)\n\n**Public datasets:** deleting a public-dataset file requires the instance-admin `MANAGE_PUBLIC_DATASET` permission. A workspace-scoped API key with read access (company opted in via `allow_access_to_public_datasets`) can see the file but gets 403, not 404, when attempting to delete it — public datasets are read-only.\n\nReturns 204 (No Content) on success.","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/files/{id}","href":"/api-reference/files/delete-a-file"},{"title":"Download a document file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files/{id}/download","href":"/api-reference/files/download-a-document-file"},{"title":"Get document thumbnail","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files/{id}/thumbnail","href":"/api-reference/files/get-document-thumbnail"}]},{"group":"Facets","pages":[{"title":"List content types","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/content-types","href":"/api-reference/facets/list-content-types"},{"title":"Define content types and attributes","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types","href":"/api-reference/facets/define-content-types-and-attributes"},{"title":"Batch define content types and attributes","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types/batch","href":"/api-reference/facets/batch-define-content-types-and-attributes"},{"title":"Resolve search scope","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types/scope","href":"/api-reference/facets/resolve-search-scope"},{"title":"List content type templates","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/content-types/templates","href":"/api-reference/facets/list-content-type-templates"},{"title":"Resolve search scope","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/content-types/scope","href":"/api-reference/facets/resolve-search-scope"},{"title":"List file classifications and attribute values","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/files/{file_id}/facets","href":"/api-reference/facets/list-file-classifications-and-attribute-values"},{"title":"Classify file and set attribute values","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files/{file_id}/facets","href":"/api-reference/facets/classify-file-and-set-attribute-values"},{"title":"Batch classify and set attribute values","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files/{file_id}/facets/batch","href":"/api-reference/facets/batch-classify-and-set-attribute-values"}]},{"group":"Tags","pages":[{"title":"List all tags for the authenticated user's company","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/tags","href":"/api-reference/tags/list-all-tags-for-the-authenticated-users-company"},{"title":"Create a new tag for the company","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/tags","href":"/api-reference/tags/create-a-new-tag-for-the-company"},{"title":"Delete a company tag","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/tags/{id}","href":"/api-reference/tags/delete-a-company-tag"},{"title":"Add tags to a file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/files/{id}/tags","href":"/api-reference/files/add-tags-to-a-file"},{"title":"Remove a tag from a file","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/files/{id}/tags/{tag_id}","href":"/api-reference/files/remove-a-tag-from-a-file"}]},{"group":"Workspaces","pages":[{"title":"List workspaces","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/workspaces","href":"/api-reference/workspaces/list-workspaces"},{"title":"Create a workspace","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/workspaces","href":"/api-reference/workspaces/create-a-workspace"},{"title":"Retrieve a workspace","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/workspaces/{id}","href":"/api-reference/workspaces/retrieve-a-workspace"},{"title":"Update a workspace","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/workspaces/{id}","href":"/api-reference/workspaces/update-a-workspace"},{"title":"Delete a workspace","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/workspaces/{id}","href":"/api-reference/workspaces/delete-a-workspace"},{"title":"Browse datasource folders","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/workspaces/datasource/browse","href":"/api-reference/workspaces/browse-datasource-folders"},{"title":"Test datasource credentials","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/workspaces/datasource/test","href":"/api-reference/workspaces/test-datasource-credentials"}]}]},{"group":"Document Processing","pages":[{"group":"Parse","pages":[{"title":"Parse a document to Markdown","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/parse","href":"/api-reference/parse/parse-a-document-to-markdown"},{"title":"Get the status and result of an async parse job","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/parse/{id}","href":"/api-reference/parse/get-the-status-and-result-of-an-async-parse-job"},{"title":"Render a document as PDF","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/preview","href":"/api-reference/parse/render-a-document-as-pdf"}]},{"group":"Extract","pages":[{"title":"Extract structured data from a document","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/extract","href":"/api-reference/extract/extract-structured-data-from-a-document"},{"title":"Get the status and result of an async extract job","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/extract/{job_id}","href":"/api-reference/extract/get-the-status-and-result-of-an-async-extract-job"}]}]},{"group":"Administration","pages":[{"group":"API Keys","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create API key","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/keys","href":"/api-reference/api-keys/create-api-key"},{"title":"Retrieve API key","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/keys/{id}","href":"/api-reference/api-keys/retrieve-api-key"},{"title":"Update API key","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/keys/{id}","href":"/api-reference/api-keys/update-api-key"},{"title":"Revoke API key","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/keys/{id}","href":"/api-reference/api-keys/revoke-api-key"}]},{"group":"Budget","pages":[{"title":"Get company budget","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/billing/budget","href":"/api-reference/budget/get-company-budget"},{"title":"Create or update company budget","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml put /api/v3/billing/budget","href":"/api-reference/budget/create-or-update-company-budget"},{"title":"Delete company budget","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/billing/budget","href":"/api-reference/budget/delete-company-budget"},{"title":"List budget alerts","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml get /api/v3/billing/budget/alerts","href":"/api-reference/budget/list-budget-alerts"},{"title":"Create budget alert","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml post /api/v3/billing/budget/alerts","href":"/api-reference/budget/create-budget-alert"},{"title":"Toggle all budget alerts","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/billing/budget/alerts","href":"/api-reference/budget/toggle-all-budget-alerts"},{"title":"Update budget alert","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml patch /api/v3/billing/budget/alerts/{id}","href":"/api-reference/budget/update-budget-alert"},{"title":"Delete budget alert","deprecated":null,"version":null,"openapi":"/api-reference/api-console.yaml delete /api/v3/billing/budget/alerts/{id}","href":"/api-reference/budget/delete-budget-alert"}]}]}]},{"tab":"Tutorials","pages":[{"title":"Tutorials","href":"/tutorials"}]},{"tab":"Settings","pages":[{"title":"Settings","href":"/untitled-page"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations"}]},{"tab":"MCP Server","pages":[{"title":"MCP Server","href":"/mcp-server/quickstart"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks"}]},{"tab":"Use Cases","pages":[{"title":"Use Cases","href":"/use-cases"}]},{"tab":"Legal","pages":[{"title":"Legal","href":"/legal/terms-of-use"}]},{"tab":"Support","pages":[{"title":"Support","href":"/support"}]}]},"basePath":"","title":"Update file metadata or replace its file - LightOn Developers","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-NXj-Rqjv.js","utils-m0thOP-_.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D13EKcfm.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema--XTdfsEb.js","snippetPresets-D3s4lmAH.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-ChURybxL.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DL8CiXq2.js","shallow-DI2-YB2E.js","getApiPlaygroundDisplay-DxbW7b_y.js","CodeSnippet-CiNYS0pP.js","CodeSnippets-BT87bThu.js","Page-DSpdRuhM.js","getPastedJson-F_g_IrFQ.js","icon-CCIG5BAs.js","MethodPill-DY3E0jwx.js","DuplicateIcon-BN88xnEg.js","createIcon-VCCc5HO5.js","DynamicMarkdown-CaSwclgK.js","SectionHeading-DXV8nWhc.js","axios-vUo_bRtp.js","Markdown-CV32Re6G.js","clsx-5ydLOnhV.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-pFDdfjRe.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BUGO5bPJ.js"]}