Edit a file
artifact_site_editUpdate one text file in an existing remote page without changing its URL or other files. Read the file first, then submit replacement text and version to create a new version.
Instructions
Change one text file in an existing remote page or website, keeping the other files and the artifact URL. Use for 'fix the heading' or 'update this chart script'. Read the file first, then submit its complete replacement text and the version you read. Creates a new version. A 409 requires reading the latest version before retrying; do not blindly overwrite a concurrent edit. Use update for a whole project or binary document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative text filename from get_site, such as index.html. | |
| slug | Yes | Artifact identifier returned by find/publish, or the slug in its /s/ URL. Not a local path. | |
| content | Yes | Complete new text of this file, not a diff. | |
| tenant_id | No | Destination tenant for creation; defaults to the account tenant. | |
| share_token | No | Token from a user-provided share URL; carries only that share permission. | |
| operation_key | No | Persist a unique key before this write. Reuse exactly the same key and arguments after errors; recover results for seven days using operation_status. | |
| expected_version | Yes | Version ID read before the edit. |