Update a file

View as Markdown

Renames, re-tags, archives, or moves a file between folders. Rename/re-tag/archive require project:manage; the folder move (folderId) requires file:write. The body carries any of filename, tags, archivedAt, folderId.

Authentication

AuthorizationBearer

WorkOS session JWT or an organization API key, sent as Authorization: Bearer <token>.

Path parameters

projectIdstringRequired
fileIdstringRequired

Request

This endpoint expects an object.
filenamestringOptional

New display name (storage location is immutable).

tagslist of stringsOptional

Replacement tag labels (lowercased).

archivedAtstring or nullOptional

Archive (a timestamp) or restore (null) the file.

folderIdstring or nullOptional

Move the file to a folder (null = the Inbox).

Response

The updated file.
fileobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error