Skip to main content
PUT
Write a workspace file's text

Authorizations

Authorization
string
header
required

Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.

Body

application/json
path
string
required

Workspace file path, e.g. /reports/q2.md. A leading /workspace/ mount prefix is stripped.

content
string
required

Full replacement text (UTF-8, <= 400 KB).

expectedPreviousHash
string

contentHash from the last read; the write is rejected with version_mismatch if the file changed since.

Response

Successful response

path
string
required

Normalized workspace path that was written.

contentHash
string
required