Workers AI targeted single-node edit of an automation definition
Requires ADMIN. Returns either a modifiedDefinition to adopt or a clarify question; never writes journeys/versions or auto-publishes. 503 when AI binding absent.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project (tenant) identifier. Row-level tenant isolation is enforced on every query.
Automation (journey) identifier.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Journey/automation graph definition. Nodes are typed (trigger/action/branch/wait/waitForEvent/timeWindow).
object
object
Examplegenerated
{ "instruction": "example", "baseDefinition": { "nodes": [ {} ] }, "targetNodeIdHint": "example"}Responses
Section titled “Responses”Either an edit result or a clarify question (discriminated by action).
object
Journey/automation graph definition. Nodes are typed (trigger/action/branch/wait/waitForEvent/timeWindow).
object
object
Not authenticated (401 via requireAuthenticated) or insufficient project role (403).
object
Human-readable error message.
Examplegenerated
{ "error": "example", "message": "example"}Resource not found (or cross-tenant — same 404).
object
Human-readable error message.
Examplegenerated
{ "error": "example", "message": "example"}Param validation failed or edit invalid (error in [invalid_request, edit_invalid]); may include draftId.
object
object
Examplegenerated
{ "error": "example", "message": "example", "errors": [ "example" ], "issues": [ {} ], "draftId": "example"}Workers AI unavailable (error=ai_unavailable).
object
Human-readable error message.
Examplegenerated
{ "error": "example", "message": "example"}