Replace the workflow with the definition in the body and mint a new version.Requires the Workflow: Full permission on the workflow.
This is a replace, not a merge. Nodes and edges absent from the body are removed from the new version — so send the whole workflow, not just the parts you changed.Fetch the current definition with Get Workflow Details first, modify it, then send it back in full.
The change is recorded as a single API-update entry in the workflow’s version history. Earlier versions are untouched and stay retrievable by version number or ID.
Path Parameters
string
required
The ID of the workflow to update
Headers
string
required
Your API authentication key
Body Parameters
string
required
Workflow name
string
Workflow description
object
Workflow nodes keyed by node ID, in the same shape as Create a Workflow. Each map key must equal the id of the node it holds.Replaces the existing set — a node absent from this map is removed from the new version.A node’s handler_class determines the shape of its process — see Node Process Types. For input_schema and output_schema, see Variable Schemas.
object
Workflow edges keyed by edge ID, in the same shape as Create a Workflow. Each map key must equal the id of the edge it holds, and from_node_id and to_node_id must name nodes present in nodes.Replaces the existing set — an edge absent from this map is removed from the new version.
string
Workflow active status. One of active or inactive.
string
Workflow validity status. One of valid or invalid.
Response
string
required
The ID of the version this update created
number
required
The version number this update created
number
Major component of the new version. null if the workflow is not semantically versioned.
number
Minor component of the new version. null if the workflow is not semantically versioned.
string
How the version was classified. One of major or minor.An API update always classifies as major, because a single call can rewrite the whole workflow.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Opus Docs","description":"Welcome to the Opus Developer Hub, where you can learn more about building on the Opus platform.","colors":{"primary":"#2B5DDC","light":"#4A7AE8","dark":"#2B5DDC"},"logo":{"light":"https://mintcdn.com/appliedai-7127e5be/wVwGgyXIDQyL0wYc/images/light-logo.svg?fit=max\u0026auto=format\u0026n=wVwGgyXIDQyL0wYc\u0026q=85\u0026s=48326fd6749a2f78fa038e3460082611","dark":"https://mintcdn.com/appliedai-7127e5be/wVwGgyXIDQyL0wYc/images/dark-logo2.svg?fit=max\u0026auto=format\u0026n=wVwGgyXIDQyL0wYc\u0026q=85\u0026s=c54f70c148f8c84e4e26bcd6c138d0ca","href":"https://developer.opus.com"},"favicon":{"light":"https://mintcdn.com/appliedai-7127e5be/wVwGgyXIDQyL0wYc/images/opus-logo-black.svg?fit=max\u0026auto=format\u0026n=wVwGgyXIDQyL0wYc\u0026q=85\u0026s=67d85bd5b1728b436ffd8f1aed7e3569","dark":"https://mintcdn.com/appliedai-7127e5be/wVwGgyXIDQyL0wYc/images/opus-logo-white.svg?fit=max\u0026auto=format\u0026n=wVwGgyXIDQyL0wYc\u0026q=85\u0026s=0a31436012d29178b51969a0d34b86f9"},"api":{"playground":{"display":"interactive"}},"appearance":{"default":"dark"},"background":{"decoration":"grid","color":{"light":"#f9f9f9","dark":"#020202"}},"navbar":{"links":[{"href":"https://www.opus.com/blog/2026-enterprise-ais-make-or-break-year","label":"Blog"},{"href":"mailto:support@opus.com","label":"Support "},{"href":"https://status.opus.com/","label":"Status"}]},"footer":{"socials":{"x":"https://x.com/AppliedAICo","linkedin":"https://www.linkedin.com/company/appliedaico","discord":"https://discord.com/invite/M5nBqhkUYH","youtube":"https://www.youtube.com/@AppliedAICo","website":"https://opus.com"}},"search":{"prompt":"Search or Ask Opus Docs..."},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"appliedai-7127e5be","hasAudioNarration":false,"actualSubdomain":"appliedai-7127e5be","customDomains":["developer.opus.com"],"gitSource":{"type":"github","owner":"aaico","repo":"opus-dev-docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b00519c89d041245afe7c9d","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API Reference","count":51},{"language":"default","tag":"Release Notes","count":36},{"language":"default","tag":"Releases","count":36},{"language":"default","tag":"Guides","count":24},{"language":"default","tag":"Deprecated","count":18},{"language":"default","tag":"Workflows","count":15},{"language":"default","tag":"Tasks","count":14},{"language":"default","tag":"Integrations","count":9},{"language":"default","tag":"Cases","count":7},{"language":"default","tag":"Node Reference","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/v1-workflow-generation/update-workflow","slug":"/api-reference/v1-workflow-generation/update-workflow","pageMetadata":{"title":"Update a Workflow","api":"PUT https://operator.opus.com/api/v1/workflow/{workflowId}","description":"Replace a workflow's definition and mint a new version","playground":"simple","href":"/api-reference/v1-workflow-generation/update-workflow"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Replace a workflow’s definition and mint a new version\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Heading,ParamField,ResponseField,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Replace the workflow with the definition in the body and mint a new version.`}),`\n`,_jsxs(_components.p,{children:[`Requires the `,_jsx(_components.strong,{children:`Workflow: Full`}),` permission on the workflow.`]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This is a replace, not a merge.`}),` Nodes and edges absent from the body are removed from the new version — so send the whole workflow, not just the parts you changed.`]}),_jsxs(_components.p,{children:[`Fetch the current definition with `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/get-workflow-details`,children:`Get Workflow Details`}),` first, modify it, then send it back in full.`]})]}),`\n`,_jsx(_components.p,{children:`The change is recorded as a single API-update entry in the workflow’s version history. Earlier versions are untouched and stay retrievable by version number or ID.`}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`workflowId`,type:`string`,required:true,id:`param-workflow-id`,children:_jsx(_components.p,{children:`The ID of the workflow to update`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`x-service-key`,type:`string`,required:true,id:`param-x-service-key`,children:_jsx(_components.p,{children:`Your API authentication key`})}),`\n`,_jsx(Heading,{level:`2`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`Workflow name`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Workflow description`})}),`\n`,_jsxs(ParamField,{body:`nodes`,type:`object`,id:`param-nodes`,children:[_jsxs(_components.p,{children:[`Workflow nodes keyed by node ID, in the same shape as `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/create-workflow#body-parameters`,children:`Create a Workflow`}),`. Each map key must equal the `,_jsx(_components.code,{children:`id`}),` of the node it holds.`]}),_jsx(_components.p,{children:`Replaces the existing set — a node absent from this map is removed from the new version.`}),_jsxs(_components.p,{children:[`A node’s `,_jsx(_components.code,{children:`handler_class`}),` determines the shape of its `,_jsx(_components.code,{children:`process`}),` — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/node-process-types`,children:`Node Process Types`}),`. For `,_jsx(_components.code,{children:`input_schema`}),` and `,_jsx(_components.code,{children:`output_schema`}),`, see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas`,children:`Variable Schemas`}),`.`]})]}),`\n`,_jsxs(ParamField,{body:`edges`,type:`object`,id:`param-edges`,children:[_jsxs(_components.p,{children:[`Workflow edges keyed by edge ID, in the same shape as `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/create-workflow#body-parameters`,children:`Create a Workflow`}),`. Each map key must equal the `,_jsx(_components.code,{children:`id`}),` of the edge it holds, and `,_jsx(_components.code,{children:`from_node_id`}),` and `,_jsx(_components.code,{children:`to_node_id`}),` must name nodes present in `,_jsx(_components.code,{children:`nodes`}),`.`]}),_jsx(_components.p,{children:`Replaces the existing set — an edge absent from this map is removed from the new version.`})]}),`\n`,_jsx(ParamField,{body:`activeStatus`,type:`string`,id:`param-active-status`,children:_jsxs(_components.p,{children:[`Workflow active status. One of `,_jsx(_components.code,{children:`active`}),` or `,_jsx(_components.code,{children:`inactive`}),`.`]})}),`\n`,_jsx(ParamField,{body:`validityStatus`,type:`string`,id:`param-validity-status`,children:_jsxs(_components.p,{children:[`Workflow validity status. One of `,_jsx(_components.code,{children:`valid`}),` or `,_jsx(_components.code,{children:`invalid`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`workflowVersionId`,type:`string`,required:true,id:`param-workflow-version-id`,children:_jsx(_components.p,{children:`The ID of the version this update created`})}),`\n`,_jsx(ResponseField,{name:`workflowVersionNumber`,type:`number`,required:true,id:`param-workflow-version-number`,children:_jsx(_components.p,{children:`The version number this update created`})}),`\n`,_jsx(ResponseField,{name:`majorVersion`,type:`number`,id:`param-major-version`,children:_jsxs(_components.p,{children:[`Major component of the new version. `,_jsx(_components.code,{children:`null`}),` if the workflow is not semantically versioned.`]})}),`\n`,_jsx(ResponseField,{name:`minorVersion`,type:`number`,id:`param-minor-version`,children:_jsxs(_components.p,{children:[`Minor component of the new version. `,_jsx(_components.code,{children:`null`}),` if the workflow is not semantically versioned.`]})}),`\n`,_jsxs(ResponseField,{name:`versionLabel`,type:`string`,id:`param-version-label`,children:[_jsxs(_components.p,{children:[`How the version was classified. One of `,_jsx(_components.code,{children:`major`}),` or `,_jsx(_components.code,{children:`minor`}),`.`]}),_jsxs(_components.p,{children:[`An API update always classifies as `,_jsx(_components.code,{children:`major`}),`, because a single call can rewrite the whole workflow.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsx(ResponseField,{name:`400`,type:`Bad Request`,id:`param-400`,children:_jsx(_components.p,{children:`The workflow definition is malformed.`})}),`\n`,_jsx(ResponseField,{name:`401`,type:`Unauthorized`,id:`param-401`,children:_jsx(_components.p,{children:`Missing, invalid, or expired API key.`})}),`\n`,_jsx(ResponseField,{name:`403`,type:`Forbidden`,id:`param-403`,children:_jsx(_components.p,{children:`No access to this workflow.`})}),`\n`,_jsx(ResponseField,{name:`404`,type:`Not Found`,id:`param-404`,children:_jsx(_components.p,{children:`The workflow does not exist.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a Workflow","api":"PUT https://operator.opus.com/api/v1/workflow/{workflowId}","description":"Replace a workflow's definition and mint a new version","playground":"simple","href":"/api-reference/v1-workflow-generation/update-workflow"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Replace the workflow with the definition in the body and mint a new version.`}),`\n`,_jsxs(_components.p,{children:[`Requires the `,_jsx(_components.strong,{children:`Workflow: Full`}),` permission on the workflow.`]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This is a replace, not a merge.`}),` Nodes and edges absent from the body are removed from the new version — so send the whole workflow, not just the parts you changed.`]}),_jsxs(_components.p,{children:[`Fetch the current definition with `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/get-workflow-details`,children:`Get Workflow Details`}),` first, modify it, then send it back in full.`]})]}),`\n`,_jsx(_components.p,{children:`The change is recorded as a single API-update entry in the workflow’s version history. Earlier versions are untouched and stay retrievable by version number or ID.`}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`workflowId`,type:`string`,required:true,id:`param-workflow-id`,children:_jsx(_components.p,{children:`The ID of the workflow to update`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`x-service-key`,type:`string`,required:true,id:`param-x-service-key`,children:_jsx(_components.p,{children:`Your API authentication key`})}),`\n`,_jsx(Heading,{level:`2`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`Workflow name`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Workflow description`})}),`\n`,_jsxs(ParamField,{body:`nodes`,type:`object`,id:`param-nodes`,children:[_jsxs(_components.p,{children:[`Workflow nodes keyed by node ID, in the same shape as `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/create-workflow#body-parameters`,children:`Create a Workflow`}),`. Each map key must equal the `,_jsx(_components.code,{children:`id`}),` of the node it holds.`]}),_jsx(_components.p,{children:`Replaces the existing set — a node absent from this map is removed from the new version.`}),_jsxs(_components.p,{children:[`A node’s `,_jsx(_components.code,{children:`handler_class`}),` determines the shape of its `,_jsx(_components.code,{children:`process`}),` — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/node-process-types`,children:`Node Process Types`}),`. For `,_jsx(_components.code,{children:`input_schema`}),` and `,_jsx(_components.code,{children:`output_schema`}),`, see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas`,children:`Variable Schemas`}),`.`]})]}),`\n`,_jsxs(ParamField,{body:`edges`,type:`object`,id:`param-edges`,children:[_jsxs(_components.p,{children:[`Workflow edges keyed by edge ID, in the same shape as `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/create-workflow#body-parameters`,children:`Create a Workflow`}),`. Each map key must equal the `,_jsx(_components.code,{children:`id`}),` of the edge it holds, and `,_jsx(_components.code,{children:`from_node_id`}),` and `,_jsx(_components.code,{children:`to_node_id`}),` must name nodes present in `,_jsx(_components.code,{children:`nodes`}),`.`]}),_jsx(_components.p,{children:`Replaces the existing set — an edge absent from this map is removed from the new version.`})]}),`\n`,_jsx(ParamField,{body:`activeStatus`,type:`string`,id:`param-active-status`,children:_jsxs(_components.p,{children:[`Workflow active status. One of `,_jsx(_components.code,{children:`active`}),` or `,_jsx(_components.code,{children:`inactive`}),`.`]})}),`\n`,_jsx(ParamField,{body:`validityStatus`,type:`string`,id:`param-validity-status`,children:_jsxs(_components.p,{children:[`Workflow validity status. One of `,_jsx(_components.code,{children:`valid`}),` or `,_jsx(_components.code,{children:`invalid`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`workflowVersionId`,type:`string`,required:true,id:`param-workflow-version-id`,children:_jsx(_components.p,{children:`The ID of the version this update created`})}),`\n`,_jsx(ResponseField,{name:`workflowVersionNumber`,type:`number`,required:true,id:`param-workflow-version-number`,children:_jsx(_components.p,{children:`The version number this update created`})}),`\n`,_jsx(ResponseField,{name:`majorVersion`,type:`number`,id:`param-major-version`,children:_jsxs(_components.p,{children:[`Major component of the new version. `,_jsx(_components.code,{children:`null`}),` if the workflow is not semantically versioned.`]})}),`\n`,_jsx(ResponseField,{name:`minorVersion`,type:`number`,id:`param-minor-version`,children:_jsxs(_components.p,{children:[`Minor component of the new version. `,_jsx(_components.code,{children:`null`}),` if the workflow is not semantically versioned.`]})}),`\n`,_jsxs(ResponseField,{name:`versionLabel`,type:`string`,id:`param-version-label`,children:[_jsxs(_components.p,{children:[`How the version was classified. One of `,_jsx(_components.code,{children:`major`}),` or `,_jsx(_components.code,{children:`minor`}),`.`]}),_jsxs(_components.p,{children:[`An API update always classifies as `,_jsx(_components.code,{children:`major`}),`, because a single call can rewrite the whole workflow.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsx(ResponseField,{name:`400`,type:`Bad Request`,id:`param-400`,children:_jsx(_components.p,{children:`The workflow definition is malformed.`})}),`\n`,_jsx(ResponseField,{name:`401`,type:`Unauthorized`,id:`param-401`,children:_jsx(_components.p,{children:`Missing, invalid, or expired API key.`})}),`\n`,_jsx(ResponseField,{name:`403`,type:`Forbidden`,id:`param-403`,children:_jsx(_components.p,{children:`No access to this workflow.`})}),`\n`,_jsx(ResponseField,{name:`404`,type:`Not Found`,id:`param-404`,children:_jsx(_components.p,{children:`The workflow does not exist.`})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'x-service-key: {YOUR_SERVICE_KEY}'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Quarterly Report Processor\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Summarizes quarterly financial reports\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"activeStatus\": \"active\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"nodes\": { \"...\": \"the complete node map\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"edges\": { \"...\": \"the complete edge map\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`21`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`21`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`BASE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://operator.opus.com/api/v1/workflow/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{YOUR_WORKFLOW_ID}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-service-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{YOUR_SERVICE_KEY}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Read the current definition, change one thing, send the whole thing back.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`current `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.get(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`BASE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers).json()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.put(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` BASE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Quarterly Report Processor (v2)\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: current[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"nodes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: current[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"nodes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"edges\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: current[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"edges\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"activeStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.json())`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`20`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` base`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-service-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{YOUR_SERVICE_KEY}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Read the current definition, change one thing, send the whole thing back.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` current`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`base`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`base`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PUT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Quarterly Report Processor (v2)\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` description:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` current`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`description`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` nodes:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` current`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`nodes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` edges:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` current`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`edges`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` activeStatus:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200 Response`,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"workflowVersionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{WORKFLOW_VERSION_ID}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"workflowVersionNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"majorVersion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minorVersion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"versionLabel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"major\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a Workflow","api":"PUT https://operator.opus.com/api/v1/workflow/{workflowId}","description":"Replace a workflow's definition and mint a new version","playground":"simple","href":"/api-reference/v1-workflow-generation/update-workflow"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --request\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> PUT\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --url\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'x-service-key: {YOUR_SERVICE_KEY}'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Content-Type: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --data\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\": \"Quarterly Report Processor\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Summarizes quarterly financial reports\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"activeStatus\": \"active\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"nodes\": { \"...\": \"the complete node map\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"edges\": { \"...\": \"the complete edge map\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"21\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\">BASE\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://operator.opus.com/api/v1/workflow/\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{YOUR_WORKFLOW_ID}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">headers \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"x-service-key\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{YOUR_SERVICE_KEY}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># Read the current definition, change one thing, send the whole thing back.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">current \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.get(\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\">BASE\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">headers).json()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.put(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\"> BASE\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">headers,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Quarterly Report Processor (v2)\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: current[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"description\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"nodes\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: current[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"nodes\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"edges\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: current[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"edges\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"activeStatus\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"active\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(response.json())\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"20\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> base\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"x-service-key\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"{YOUR_SERVICE_KEY}\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> };\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// Read the current definition, change one thing, send the whole thing back.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> current\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">base\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">headers\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> })).\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> response\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">base\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"PUT\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">...\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">headers\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> name:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Quarterly Report Processor (v2)\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> description:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> current\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">description\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> nodes:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> current\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">nodes\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> edges:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> current\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">edges\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> activeStatus:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"active\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }),\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 Response","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"workflowVersionId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"{WORKFLOW_VERSION_ID}\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"workflowVersionNumber\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">4\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"majorVersion\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"minorVersion\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"versionLabel\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"major\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Update a Workflow","path":"/api/v1/workflow/{workflowId}","servers":[{"url":"https://operator.opus.com"}],"method":"put","request":{"security":[],"parameters":{"query":{},"header":{"x-service-key":{"schema":[{"type":"string","description":"Your API authentication key","required":true}]}},"cookie":{},"path":{"workflowId":{"schema":[{"type":"string","description":"The ID of the workflow to update","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"Workflow name","required":true}],"description":[{"type":"string","description":"Workflow description"}],"nodes":[{"type":"object","properties":{},"description":"Workflow nodes keyed by node ID, in the same shape as Create a Workflow . Each map key must equal the `id` of the node it holds. Replaces the existing set — a node absent from this map is removed from the new version. A node’s `handler_class` determines the shape of its `process` — see Node Process Types . For `input_schema` and `output_schema` , see Variable Schemas ."}],"edges":[{"type":"object","properties":{},"description":"Workflow edges keyed by edge ID, in the same shape as Create a Workflow . Each map key must equal the `id` of the edge it holds, and `from_node_id` and `to_node_id` must name nodes present in `nodes` . Replaces the existing set — an edge absent from this map is removed from the new version."}],"activeStatus":[{"type":"string","description":"Workflow active status. One of `active` or `inactive` ."}],"validityStatus":[{"type":"string","description":"Workflow validity status. One of `valid` or `invalid` ."}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","description":"\u003cstring>","nodes":{},"edges":{},"activeStatus":"\u003cstring>","validityStatus":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"400":[{"type":"object","properties":{},"description":"The workflow definition is malformed."}],"401":[{"type":"object","properties":{},"description":"Missing, invalid, or expired API key."}],"403":[{"type":"object","properties":{},"description":"No access to this workflow."}],"404":[{"type":"object","properties":{},"description":"The workflow does not exist."}],"workflowVersionId":[{"type":"string","description":"The ID of the version this update created","required":true}],"workflowVersionNumber":[{"type":"number","description":"The version number this update created","required":true}],"majorVersion":[{"type":"number","description":"Major component of the new version. `null` if the workflow is not semantically versioned."}],"minorVersion":[{"type":"number","description":"Minor component of the new version. `null` if the workflow is not semantically versioned."}],"versionLabel":[{"type":"string","description":"How the version was classified. One of `major` or `minor` . An API update always classifies as `major` , because a single call can rewrite the whole workflow."}]}}],"examples":{"example":{"value":{"400":{},"401":{},"403":{},"404":{},"workflowVersionId":"\u003cstring>","workflowVersionNumber":123,"majorVersion":123,"minorVersion":123,"versionLabel":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"appliedai-7127e5be","siteName":"Opus Docs","title":"Update a Workflow - Opus Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-05T06:34:42.255Z","originalFileLocation":"api-reference/v1-workflow-generation/update-workflow.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Replace a workflow\u0026#x27;s definition and mint a new version\">\u003cmeta data-mint-head name=\"application-name\" content=\"Opus Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a Workflow - Opus Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Replace a workflow\u0026#x27;s definition and mint a new version\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Opus Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://appliedai-7127e5be.mintlify.site/_mintlify/api/og/v2?division=Workflows\u0026amp;title=Update+a+Workflow\u0026amp;description=Replace+a+workflow%27s+definition+and+mint+a+new+version\u0026amp;theme=7962c46fe7a071bfab35bbb3\u0026amp;signature=a967983e7d1ef1feeedbc73ea5468db0f233e68070b53069e4e8368dd8427254\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update a Workflow - Opus Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Replace a workflow\u0026#x27;s definition and mint a new version\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://appliedai-7127e5be.mintlify.site/_mintlify/api/og/v2?division=Workflows\u0026amp;title=Update+a+Workflow\u0026amp;description=Replace+a+workflow%27s+definition+and+mint+a+new+version\u0026amp;theme=7962c46fe7a071bfab35bbb3\u0026amp;signature=a967983e7d1ef1feeedbc73ea5468db0f233e68070b53069e4e8368dd8427254\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/appliedai-7127e5be/izBgmHq5AgpZ-DmU/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Opus Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2B5DDC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/v1-workflow-generation/update-workflow.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.opus.com/#organization\",\"name\":\"Opus Docs\",\"url\":\"https://developer.opus.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/appliedai-7127e5be/wVwGgyXIDQyL0wYc/images/light-logo.svg?fit=max\u0026auto=format\u0026n=wVwGgyXIDQyL0wYc\u0026q=85\u0026s=48326fd6749a2f78fa038e3460082611\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.opus.com#website\",\"name\":\"Opus Docs\",\"url\":\"https://developer.opus.com\",\"publisher\":{\"@id\":\"https://developer.opus.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow#webpage\",\"url\":\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow\",\"name\":\"Update a Workflow\",\"description\":\"Replace a workflow's definition and mint a new version\",\"dateModified\":\"2026-10-05T06:34:42.255Z\",\"isPartOf\":{\"@id\":\"https://developer.opus.com#website\"},\"breadcrumb\":{\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Workflows\",\"item\":\"https://developer.opus.com/api-reference/v1-workflow-generation/workflow-generation-introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update a Workflow\",\"item\":\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow#apireference\",\"headline\":\"Update a Workflow\",\"name\":\"Update a Workflow\",\"description\":\"Replace a workflow's definition and mint a new version\",\"url\":\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow\",\"mainEntityOfPage\":{\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/update-workflow#webpage\"},\"dateModified\":\"2026-10-05T06:34:42.255Z\",\"publisher\":{\"@id\":\"https://developer.opus.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.opus.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Opus Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Opus Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/v1-workflow-generation/update-workflow.md","siteName":"Opus Docs","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API Reference","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"API Quickstart","href":"/api-reference/quickstart"}]},{"group":"Workflows","pages":[{"title":"Introduction","href":"/api-reference/v1-workflow-generation/workflow-generation-introduction"},{"title":"Create a Workflow","api":"POST https://operator.opus.com/api/v1/workflow","playground":"simple","href":"/api-reference/v1-workflow-generation/create-workflow"},{"title":"Get Workflow Details","api":"GET https://operator.opus.com/api/v1/workflow/{workflowId}","description":"Retrieve the workflow object — name, status, nodes and edges","href":"/api-reference/v1-workflow-generation/get-workflow-details"},{"title":"Update a Workflow","api":"PUT https://operator.opus.com/api/v1/workflow/{workflowId}","playground":"simple","href":"/api-reference/v1-workflow-generation/update-workflow"},{"title":"Archive a Workflow","api":"DELETE https://operator.opus.com/api/v1/workflow/{workflowId}","description":"Archive a workflow, removing it from listings","playground":"simple","href":"/api-reference/v1-workflow-generation/archive-workflow"},{"title":"Restore a Workflow","api":"POST https://operator.opus.com/api/v1/workflow/{workflowId}/restore","playground":"simple","href":"/api-reference/v1-workflow-generation/restore-workflow"},{"title":"Generate a Workflow","api":"POST https://operator.opus.com/api/v1/workflow/generate","playground":"simple","href":"/api-reference/v1-workflow-generation/generate-headless"},{"title":"Get Run Status","api":"GET https://operator.opus.com/api/v1/workflow/{workflowId}/run","playground":"simple","href":"/api-reference/v1-workflow-generation/get-run-status"},{"title":"Cancel a Run","api":"POST https://operator.opus.com/api/v1/workflow/{workflowId}/run/cancel","playground":"simple","href":"/api-reference/v1-workflow-generation/cancel-run"},{"group":"Node Reference","pages":[{"title":"Node Process Types","href":"/api-reference/v1-workflow-generation/node-process-types"},{"title":"Agent Node","href":"/api-reference/v1-workflow-generation/agent-node"},{"title":"Code Node","href":"/api-reference/v1-workflow-generation/code-node"},{"title":"Human Node","href":"/api-reference/v1-workflow-generation/human-node"},{"title":"Integration Node","href":"/api-reference/v1-workflow-generation/integration-node"},{"title":"Variable Schemas","href":"/api-reference/v1-workflow-generation/variable-schemas"}]}]},{"group":"Cases","pages":[{"title":"Introduction","href":"/api-reference/v1-case/case-introduction"},{"title":"Initiate Case","api":"POST https://operator.opus.com/api/v1/case","href":"/api-reference/v1-case/initiate-case"},{"title":"Execute Case","api":"POST https://operator.opus.com/api/v1/case/{caseId}/execute","playground":"simple","href":"/api-reference/v1-case/execute-case"},{"title":"Get Case Status","api":"GET https://operator.opus.com/api/v1/case/{caseId}/status","href":"/api-reference/v1-case/get-case-status"},{"title":"Cancel Case","api":"POST https://operator.opus.com/api/v1/case/{caseId}/cancel","href":"/api-reference/v1-case/cancel-case"},{"title":"Get Case Results","api":"GET https://operator.opus.com/api/v1/case/{caseId}/results","href":"/api-reference/v1-case/get-case-results"},{"title":"Case Audit Log","api":"GET https://operator.opus.com/api/v1/case/{caseId}/audit","href":"/api-reference/v1-case/case-audit-log"}]},{"group":"Files","pages":[{"title":"Introduction","href":"/api-reference/v1-file/file-introduction"},{"title":"Get Upload URL","api":"POST https://operator.opus.com/api/v1/file/upload/presigned","href":"/api-reference/v1-file/get-upload-url"},{"title":"Upload File","api":"PUT {presignedUrl}","playground":"simple","href":"/api-reference/v1-file/upload-file"}]},{"group":"Business Process Discovery","pages":[{"title":"Introduction","href":"/api-reference/v1-discovery/discovery-introduction"},{"title":"Get a Process","api":"GET https://operator.opus.com/api/v1/discovery/process/{processId}","href":"/api-reference/v1-discovery/get-process-details"}]},{"group":"Integrations","pages":[{"title":"Introduction","href":"/api-reference/v1-integration/integration-introduction"},{"title":"Create a Provider","api":"POST https://operator.opus.com/api/v1/integration/provider","href":"/api-reference/v1-integration/create-provider"},{"title":"Create an Integration","api":"POST https://operator.opus.com/api/v1/integration","href":"/api-reference/v1-integration/create-integration"},{"title":"Add an Action","api":"POST https://operator.opus.com/api/v1/integration/v/{integrationVersionId}/action","href":"/api-reference/v1-integration/add-action"},{"title":"Add a Credential","api":"POST https://operator.opus.com/api/v1/integration/v/{integrationVersionId}/credential","href":"/api-reference/v1-integration/create-credential"},{"title":"Connect an Integration","api":"POST https://operator.opus.com/api/v1/integration/connect","href":"/api-reference/v1-integration/connect-integration"},{"title":"Check a Connection","api":"GET https://operator.opus.com/api/v1/integration/connect/{connectionToken}","href":"/api-reference/v1-integration/connection-status"}]},{"group":"Code","pages":[{"title":"Introduction","href":"/api-reference/v1-code/code-introduction"},{"title":"Create a Code Node","api":"POST https://operator.opus.com/api/v1/code","href":"/api-reference/v1-code/create-code"},{"title":"Update a Code Node","api":"PATCH https://operator.opus.com/api/v1/code/{codeId}","href":"/api-reference/v1-code/update-code"}]},{"group":"Agents","pages":[{"title":"Introduction","href":"/api-reference/v1-agent/agent-introduction"},{"title":"Create an Agent","api":"POST https://operator.opus.com/api/v1/agent","href":"/api-reference/v1-agent/create-agent"},{"title":"Update an Agent","api":"PATCH https://operator.opus.com/api/v1/agent/{agentId}","href":"/api-reference/v1-agent/update-agent"}]},{"group":"Deprecated","pages":[{"group":"Deprecated","expanded":false,"pages":[{"title":"Get Workflow Details","api":"GET https://operator.opus.com/workflow/{workflowId}","href":"/api-reference/v0-jobs/get-workflow-details"},{"title":"Initiate Job","api":"POST https://operator.opus.com/job/initiate","href":"/api-reference/v0-jobs/initiate-job"},{"title":"Get Upload URL","api":"POST https://operator.opus.com/job/file/upload","href":"/api-reference/v0-jobs/get-upload-url"},{"title":"Upload File","api":"PUT {presignedUrl}","playground":"simple","href":"/api-reference/v0-jobs/upload-file"},{"title":"Execute Job","api":"POST https://operator.opus.com/job/execute","playground":"simple","href":"/api-reference/v0-jobs/execute-job"},{"title":"Get Job Execution Status","api":"GET https://operator.opus.com/job/{jobExecutionId}/status","playground":"simple","href":"/api-reference/v0-jobs/get-job-status"},{"title":"Get Job Execution Results","api":"GET https://operator.opus.com/job/{jobExecutionId}/results","playground":"simple","href":"/api-reference/v0-jobs/get-job-results"},{"title":"Job Audit Log","api":"GET https://operator.opus.com/job/{jobExecutionId}/audit","playground":"simple","href":"/api-reference/v0-jobs/job-audit-log"},{"title":"Postman Collection","icon":"rectangle-list","href":"/api-reference/v0-jobs/postman-collection"}]}]}]},{"tab":"Opus SDK","pages":[{"title":"Opus SDK","href":"/opus-sdk/overview"}]},{"tab":"Opus MCP","pages":[{"title":"Opus MCP","href":"/mcp/overview"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/release-notes/opus-v2-9-3"}]}]},"basePath":"","title":"Update a Workflow - Opus Docs","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js"]}