Rename, move, or protect a file
Send exactly one of name to rename in place, parentId to move, or protected to change whether changes to this file go to review. The id never changes, so ids held by a client stay valid; the path does. Sending two, or none, is rejected rather than resolved by a precedence rule: these are separate writes with no transaction across them, so a request doing two could apply the first and fail the second with no way to report which.
Authorizations
Workspace-scoped API key, sent as a bearer token. The recommended header. The workspace is implicit in the key and never appears in a URL.
Path Parameters
The file id, as an earlier response reported it. Always doc_…; a composite id is refused.
"doc_9f2k1x8b3m7q0v"
Body
- Rename
- Move
- Protect
Rename the file in place. The id and the folder do not change.
New file name, including its extension. Renames the file in place. Send instead of parentId, never with it.
"returns.md"
Response
The file after the change. Its id is the one you sent to.
Type discriminator. Always file.
file Stable id. Survives a rename or a move.
"doc_9f2k1x8b3m7q0v"
Live file location. Changes when the file moves.
"/support/policies/refunds.md"
Leaf name, including its extension, without any part of the path.
"refunds.md"
The containing folder, or null when the file sits at the root. Send it back to move a file.
"dir_4k1n8p2v5m7q0x"
Path of the containing folder. / at the root.
"/support/policies"
When true, a change to this file goes to review instead of being accepted automatically.
The last content change to this file. A rename or a move does not advance it. Pass it back as baseChangeId on a write.
"chg_7t4p2w9c1n6s8k"
When the file was created.
"2026-07-01T09:12:00.000Z"
When the file last changed, including a rename or a move.
"2026-08-01T14:03:00.000Z"