write_file
Create or overwrite a file (up to 3 MiB). Send text as-is, or bytes as base64 with encoding='base64'. Counts against the workspace owner's storage cap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Where to save the file, like 'drafts/report.md'. An existing file is overwritten (its history is kept). | |
| content | Yes | The file's content: text as-is, or bytes as base64 (then set encoding='base64'). | |
| encoding | No | 'text' (default) or 'base64' for binary content. | text |
| api_token | No | Your hashn API token, if you can't send it as the 'Authorization: Bearer <token>' header. Omit it when the header is set. | |
| content_type | No | The file's media type, e.g. 'text/markdown' or 'image/png'. Optional. | |
| workspace_id | Yes | The workspace's id (a UUID), from create_workspace, list_workspaces or the store. |