Patch Asset
patch_assetApply targeted text changes to an existing asset (js, css, json, svg) without re-uploading the full file. Uses find/replace on the file content. Binary assets (images, fonts) are updated by re-uploading with overwrite: true instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The asset path to patch (e.g., "js/app.js", "css/style.css") | |
| patches | Yes | Array of patch operations. Each patch needs: operation ("replace" or "delete"), find (exact string to locate). For replace: also include replace (new string). | |
| project_id | Yes | The project ID | |
| base_version_hash | No | Optional. Content hash from get_asset response. If provided and mismatched, returns 409. |