Update a file in a space
Updates the editable fields of a file within a space.
You must provide the space ID and file ID in the path and the user ID, tenant 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.
Access Control:
Access to update files in a space depends on your permissions and the space's visibility:
- Private Spaces: Only accessible by the space owner
- Public Spaces: Accessible by all users within the same tenant
Authorization
ApiTokenAuth PRODUCTAPI Key with role based permission
In: header
Scope: PRODUCT
Path Parameters
The unique identifier of the space containing the file
The unique identifier of the file to update
Header Parameters
The ID of the user requesting the update
The ID of the tenant
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/spaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "x-user-id: string" \ -H "x-tenant-id: string" \ -H "Content-Type: application/json" \ -d '{ "summary": "Quarterly financial overview for Q3 2025.", "documentKind": "Report" }'{
"id": "123e4567-e89b-12d3-a456-426614174000",
"summary": "Quarterly financial overview",
"language": "en",
"documentKind": "Report",
"domain": "Finance",
"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": "Space not found"
}{
"message": "Internal Server Error"
}