Update a file
Updates the editable fields of a personal file.
You must provide the file ID in the path and the user ID in the headers.
Behavior:
- This is a partial update — only the fields present in the payload are changed; any omitted field is left unchanged.
- At least one field must be provided.
- Send
nullfor a field to clear its stored value.
Editable fields:
summary— a short summary of the document content.documentKind— the kind or type of document.
Authorization
ApiTokenAuth PRODUCTx-api-key<token>
API Key with role based permission
In: header
Scope: PRODUCT
Path Parameters
file_id*string
The ID of the file to update
Header Parameters
x-user-id*string
The ID of the user who owns the file
Request Body
application/json
The file fields to update
TypeScript Definitions
Use the request body type in TypeScript.
Partial update of a file's editable fields. Only the fields present in the
payload are updated; any omitted field is left unchanged. At least one field
must be provided. Send null to clear a field.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "x-user-id: string" \ -H "Content-Type: application/json" \ -d '{ "summary": "Quarterly financial overview for Q3 2025.", "documentKind": "Report" }'{
"id": "123e4567-e89b-12d3-a456-426614174000",
"originalName": "document.pdf",
"summary": "Quarterly financial overview",
"language": "en",
"documentKind": "Report",
"domain": "Finance",
"chunksCount": 12,
"charactersCount": 15240,
"tags": [
{
"key": "author",
"value": "Jane Doe",
"aiExtracted": true
}
]
}{
"message": "x-user-id is required"
}{
"message": "Invalid API Key"
}{
"message": "API Key does not have permission to access this resource"
}{
"message": "File not found"
}{
"message": "Internal Server Error"
}