Create a file
Creates a file at the path given. Not an upsert: a path already holding a file is a conflict, so this never overwrites and never creates a duplicate. The response carries the id and the lastChangeId; later writes address those, because a rename moves the path.
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.
Body
- Create by path
- Create in a folder
Create the file at an absolute path. Missing parent folders are created on the way.
Where to create the file. Absolute, and ends in .md. A path already holding a file is a conflict, never an overwrite.
"/support/policies/refunds.md"
Markdown or plain text.
51200"# Refunds\n\nRefunds are processed within 14 days."
Response
Created. The file is in the live files.
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"