accepts-api-key

Replace Asset Text Content

Replace or patch a text, Markdown or SVG file's content and reprocess it.

Send content to replace the whole body, or diff (a unified diff against the file as stored) to change part of a long file without resending it. Either way the file is written over in place, the way the agent's patch_file tool does, then preprocessing re-runs so the search embeddings match the new text and an SVG's thumbnail matches its new markup. There is no size limit. The resulting SVG must be a well-formed document with an <svg> root, or the call is refused with 400 and nothing is written. A diff whose hunks do not match the stored file is refused with 409; a diff that cannot be parsed with 400.

put/asset/{asset_id}/content

Request

  • Base URL
    https://api.tellers.ai (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Path parameters

asset_idstring uuid required

Headers

x-api-keystring nullable
authorizationstring nullable

Request body

contentstring nullable

The file's complete new text, UTF-8: the body of a text or Markdown file, or the full markup of an SVG. Replaces the whole body. Give this or diff, not both.

diffstring nullable

A standard unified diff against the file as stored, the format git diff prints: each hunk starts with its own '@@ -start,count +start,count @@' line, then a leading space for context, '-' to remove, '+' to add; the '--- a/file' and '+++ b/file' header lines are optional. Hunks are placed by line number and their context must match the file exactly, so read the file first. A hunk that does not match is refused with 409 and the error says which line missed. For a long file this is far smaller than resending the whole body. Give this or content, not both.

Response

Successful Response

asset_idstring required
byte_sizeinteger required

Changes

No recorded changes to this operation across all 2 revisions of this API.