Edit artifact files
const url = 'https://shareout.site/v1/artifacts/example/edits';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"base_version":3,"message":"Blue headings","ops":[{"op":"replace","path":"styles.css","old":"h1 { color: red; }","new":"h1 { color: blue; }"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shareout.site/v1/artifacts/example/edits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "base_version": 3, "message": "Blue headings", "ops": [ { "op": "replace", "path": "styles.css", "old": "h1 { color: red; }", "new": "h1 { color: blue; }" } ] }'Change an artifact with small operations instead of re-publishing every file. The ops run in order on the newest version, which base_version must name; if any op fails nothing is written. The result is published as the next version through the normal publish pipeline (moderation, tests gate, readiness), and files the ops leave unchanged are carried over without re-uploading. Counts once against the daily publish limit (dry_run does not). Requires the editor role. Works on html, markdown, csv, txt and json artifacts. Workspace Agent tokens need artifacts:publish and reach only artifacts in their own workspace. Renaming or deleting the mobile entrypoint turns the artifactβs mobile view off. Send Idempotency-Key to make retries safe.
Authorizations
Section titled βAuthorizationsβParameters
Section titled βParametersβPath Parameters
Section titled βPath ParametersβArtifact ID (e.g. art_abc123).
Request Bodyrequired
Section titled βRequest Bodyrequiredβobject
The version_no of the files you read; must be the newest version.
replace {path, old, new, all?}: old must match exactly once unless all; both are literal text ($& stays $&). In a CRLF file an old written with LF still matches and the replacement takes CRLF. write {path, content, encoding?} creates or replaces a whole file (encoding: base64 for binary). delete {path}. rename {from, to} moves a file without re-uploading it (same file type only).
object
Note for the version history.
Report changes without saving anything.
Example
{ "base_version": 3, "message": "Blue headings", "ops": [ { "op": "replace", "path": "styles.css", "old": "h1 { color: red; }", "new": "h1 { color: blue; }" } ]}Responses
Section titled βResponsesβdry_run: true ({dry_run, base_version, would_create_version, entrypoint, changes}), or ops that leave every file as it was ({unchanged: true}): no version is created.
object
object
Old path of a renamed file.
Example
{ "changes": [ { "change": "added" } ]}Saved as a new version. Same body as POST /v1/publish, plus base_version and changes.
object
object
object
object
βunlistedβ was retired 2026-07 β still accepted as input and treated as βpublicβ.
object
Old path of a renamed file.
Example
{ "visibility": "public", "changes": [ { "change": "added" } ]}Malformed request (VALIDATION_ERROR, INVALID_OPS, INVALID_PATH, INVALID_JSON).
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx β how to reach a human.
object
Index in ops of the op that failed.
EDIT_NO_MATCH: the line most like the first line of old.
object
EDIT_AMBIGUOUS: 1-based line of each match (first 20).
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}Access denied
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx β how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}Resource not found
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx β how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}VERSION_CONFLICT: the artifact has a newer version than base_version; current_version says which. Nothing was written.
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx β how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}STORAGE_LIMIT_EXCEEDED or FILE_TOO_LARGE.
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx β how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}An op could not be applied; nothing was written. EDIT_NO_MATCH (old not found; nearest is the closest line), EDIT_AMBIGUOUS (old matches several places; lines lists them β add context or set all), FILE_NOT_FOUND, FILE_EXISTS, NOT_TEXT, RENAME_CHANGES_TYPE, ENTRYPOINT_MISSING, UNSUPPORTED_ARTIFACT_TYPE.
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx β how to reach a human.
object
Index in ops of the op that failed.
EDIT_NO_MATCH: the line most like the first line of old.
object
EDIT_AMBIGUOUS: 1-based line of each match (first 20).
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}Rate limit reached (RATE_LIMIT_EXCEEDED on publish / account creation / AI routes, RATE_LIMITED on the data plane). Wait for Retry-After / reset.
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx β how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}