v1
latestOpenAPI 3.1.02026-07-263580186.3 KBFiles
Update file metadata
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
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
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
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 the file but gets 403, not 404, when attempting to edit it — public datasets are read-only.
patch/api/v3/files/{id}
Path parameters
idinteger required
A unique integer value identifying this Document.
Response
File updated successfully