Zo Space

Edit space route

Edit an existing route's code with exact edit operations, the same ones `edit_file` uses.

Preferred for edits to existing routes, including the built-in starter homepage at /. Match blocks are copied exactly from the current route code (see get_space_route).

Parameters#

pathstringrequired

Route path of the existing route to edit, e.g. '/about' or '/api/hello'.

operationsobject[]required

Edit operations applied in order: replace_block, insert_after, insert_before, delete_block, append_line. Same schema as edit_file.

publicstringdefault: ""

Optional visibility override for page routes. Omit to preserve current visibility. API routes are always public.