Save an existing file within the working directory
Confined to cwd. Cooperating ordinary and checkbox writes share the installation file gate. A stale content baseline returns 409 with current content. A replaced physical identity returns 412 FILE_IDENTITY_CHANGED; reload before saving again. This does not create files or produce a document event receipt without optional documentSave metadata. That lane is operator-only and chat-document-only, validates the server-projected incarnation, and returns an original host saved receipt without route-delivery claims. Identical retries never repeat the file effect. A duplicate acknowledges the original operation: its hash is historical, not proof against later writes. A no-op without a prior committed save has no saved receipt.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/files/content" \ -H "Content-Type: application/json" \ -d '{ "cwd": "string", "path": "string", "content": "string" }'{ "ok": true, "hash": "string", "effect": "changed", "documentReceipt": { "documentId": "string", "eventId": "string", "incarnation": { "v": 1, "documentId": "string", "physicalOpenedAt": "2019-08-24T14:15:22Z", "channelCreatedAt": "2019-08-24T14:15:22Z", "generation": "string" }, "docSeq": 1, "fileHash": "string", "status": "accepted" }}