Patch agent instructions
PATCH
Patch agent instructions

Authorizations

Authorization
string
header
required

Voiceflow bearer token

Query Parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

The alias of the environment to operate on (e.g. main).

Body

oldString
string
required

The exact text to replace, copied verbatim from a read or search result. Matching is literal — whitespace, punctuation and case must match. Do not include the line numbers a read adds.

newString
string
required

The text to put in its place. May be empty to delete.

replaceAll
boolean
default:false

Replace every occurrence. When false, more than one match is an error rather than a guess.

Response

200 - application/json

Returns how many occurrences were replaced in the main agent's instructions, a unified diff of the changed lines, the document's line count after the write, and any references or mentions the new text left unresolved.

message
string
required

A human-readable summary naming the lines that changed.

replacements
integer
required

How many occurrences were replaced.

diff
string
required

A unified diff of the changed lines, with 1-based hunk headers.

totalLines
integer
required

How many lines the document has AFTER the write.

unresolvedReferences
string[]
required

Braced {name} tokens anywhere in the document AFTER the patch that matched no variable or entity and were stored as literal text. The whole document is resolved, so a token the patch did not touch is reported too.

unresolvedMentions
string[]
required

Backticked names anywhere in the document AFTER the patch that matched no attached tool, playbook or workflow. The whole document is resolved, so a name the patch did not touch is reported too.

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.