Skip to content

Commit a single patch (5 min client timeout)

POST
/v1/patch
curl --request POST \
--url http://localhost:8090/v1/patch \
--header 'Content-Type: application/json' \
--data '{ "patchId": "example", "actor": "example", "timestamp": "2026-04-15T12:00:00Z", "source": { "uri": "example", "sourceHash": "example", "extractor": "example", "sourceType": "example", "workspaceId": "example" }, "baseRev": 1, "ops": [ { "type": "UpsertNode", "id": "example", "kind": "file", "name": "example", "attrs": {} } ], "replaces": [ "example" ], "intent": "example" }'
Media typeapplication/json
object
patchId
required
string
actor
required
string
timestamp
required
string format: date-time
source
required
object
uri
required

Workspace-relative path; opaque join key

string
sourceHash
string
extractor
required
string
sourceType
required
string
workspaceId

SHA-256 of the workspace root path

string
baseRev
required
integer
ops
required
Array

One op in a graph patch, told apart by type.

One of: discriminator: type

Create or replace a node. attrs is an open map. Symbol and file nodes carry line_start / line_end / language / role; chunk nodes carry file_uri, chunk_kind, start_line / end_line, start_byte / end_byte, content_hash and parser_version.

object
type
required
string
Allowed values: UpsertNode
id
required
string
kind
required

Every node kind a patch from the ix CLI writes. Symbol nodes come from the parser, which writes struct, enum, record, union, impl, type alias and annotation definitions as class.

string
Allowed values: file module class interface trait function method constant macro table view label config config_entry frontmatter heading section environment chunk intent doc decision
name
required
string
attrs
required
object
key
additional properties
any
replaces
required
Array<string>
intent
string

Commit result

Media typeapplication/json
object
status
string
rev
integer

Example generated

{
"status": "example",
"rev": 1
}