Preview repairs to automation field references
Checks an editor graph and proposes known field-reference repairs using database fields the caller can read. Returns the repaired graph, exact replacements, and remaining validation issues. Requires automations:write and edit access to the automation. Does not save, publish, or run anything; apply the returned graph through the draft update endpoint.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringautomationId*stringapplication/json- body
graph*trigger*||||Success
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/automations/string/reference-repairs' \ -H 'Content-Type: application/json' \ -d '{ "graph": { "nodes": [ { "id": "string", "kind": "action", "actionId": "string" } ], "edges": [ { "id": "string", "from": "string", "to": "string" } ] }, "trigger": { "kind": "manual" }}'{ "data": { "graph": { "reusable": { "inputs": [ { "key": "string", "label": "string", "type": "text", "required": true } ], "outputs": [ { "key": "string", "label": "string", "type": "text", "required": true, "value": { "type": "literal", "value": null } } ] }, "nodes": [ { "id": "string", "label": "string", "retry": { "maxAttempts": 0, "initialDelaySeconds": 0, "backoffMultiplier": 0, "maxDelaySeconds": 0 }, "position": { "x": 0, "y": 0 }, "kind": "action", "actionId": "string", "input": { "property1": { "type": "literal", "value": null }, "property2": { "type": "literal", "value": null } } } ], "edges": [ { "id": "string", "from": "string", "to": "string", "outcome": "always" } ], "entryNodeIds": [ "string" ], "testPayloads": [ { "id": "string", "name": "string", "payload": {} } ], "failureAutomationId": "string", "triggerPosition": { "x": 0, "y": 0 } }, "repairs": [ { "nodeId": "string", "from": "string", "to": "string" } ], "issues": [ { "nodeId": "string", "message": "string" } ] }}Delete an automation
Deletes the automation together with the workspace item that represents it, and records the deletion in the workspace event ledger. Requires the `automations:write` permission plus edit access; an unknown id returns not-found. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
Enable an automation
Turns the automation on and returns it; an automation that has never been published is published first, since publishing is what makes it live. Requires the `automations:write` permission plus edit access; an already-enabled automation is returned unchanged, and the publish path still enforces its preconditions, so an empty or invalid graph is rejected with a validation error. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.