Update file metadata
Update mutable fields of a file (document).
Updatable fields:
title: Update the document titletags: Replace ALL tags for the document (both manual and auto-assigned)external_metadata: Create or update external source metadata
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
tagsfield leaves tags unchanged - New tags are marked as manually assigned (
auto_assigned=False)
External metadata behavior:
- When creating for the first time,
external_idis required - When updating existing metadata,
external_idis optional (existing value is preserved) - Fields in
additional_metadataare merged (not replaced) with existing values
Validation:
- Returns 400 if only immutable fields are provided (mutable fields: ‘external_metadata’, ‘tags’, ‘title’)
- Returns 400 if tag IDs are invalid or don’t belong to user’s company
- Returns 404 if document doesn’t exist or user doesn’t have access
Documentation Index
Fetch the complete documentation index at: https://docs.lighton.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
A unique integer value identifying this Document.
Body
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
Immutable fields (if provided, will return 400):
- file, filename, workspace_id, parser, etc.
Updated title for the document.
255List 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 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.
Response
File updated successfully
Filename of the document
Workspace the document belongs to
Document summaries (all languages)
File extension of the document
Creation date of the resource
Total number of pages
Size of the file in bytes.
List of tags associated with the document
User who created the file. Null when the file was created by the system.
Upload session UUID associated with this document
TLSH hash for duplicate detection.
External document metadata
255pending- Pendingparsing- Parsingparsing_failed- Parsing Failedembedding- Embeddingembedding_failed- Embedding Failedembedded- Embeddedfail- Failupdating- Updating
pending, parsing, parsing_failed, embedding, embedding_failed, embedded, fail, updating pending- Pendingprocessing- Processingembedded- Embeddedfail- Fail-- Not available
pending, processing, embedded, fail, - Full text content of the document. Only included when include_content=true query parameter is provided.
Detailed error information. Only present when document processing has failed.
Parser/ingestion pipeline used for document processing (e.g., 'v2.1', 'v3.0').