Create a workflow in the workspace named by the x-workspace-id header.nodes and edges are optional — omit them and Opus creates the workflow with an input node and an output node already wired, ready to open in the Builder. Supply them to stand up a complete graph in a single call.Requires the Workflow: Full permission in the target workspace.
Prefer to describe the workflow in plain language instead of building the graph yourself? Use Generate Workflow and let Opus AI agents design it for you.
Headers
string
required
Your API authentication key
string
required
UUID of the workspace to create the workflow in
Body Parameters
string
required
Workflow name
string
Workflow description
object
Workflow nodes keyed by node ID. Each map key must equal the id of the node it holds.A node’s handler_class determines the shape of its process — see Node Process Types.
Show Node object
string
required
Node ID (UUID). Must match the key this node is stored under.
string
required
Node name
string
required
Node type — for example input, output, agent, integration, code
string
Node description
string
Handler ID
string
Handler version ID
string
Active handler ID
string
Active handler version ID
string
Which variety of this node type — it determines the shape of process. See Node Process Types.
string[]
Node properties. Set route when the node defines routes.
Where the node sits on the Builder canvas. Both values are integers.
Show Position object
integer
required
Horizontal position
integer
required
Vertical position
Omit it and the node is still valid — position is presentational only and never affects execution.
object
Public execution settings
object
Workflow edges keyed by edge ID. 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.
Show Edge object
string
required
Edge ID (UUID). Must match the key this edge is stored under.
string
required
Source node ID (UUID)
string
required
Target node ID (UUID)
string
Edge label. One of soft or hard.
string
ID of the route this edge belongs to
boolean
Whether this edge is the complement of its route
string
default:"inactive"
Workflow active status. One of active or inactive.
string[]
Org units to tag the new workflow to at creation. Maximum 100.Tagging is best-effort: if a tag can’t be applied, the workflow is still created and the call still succeeds.
Node and edge objects use snake_case keys (from_node_id, input_schema), while the top-level body fields use camelCase (activeStatus, orgUnitIds). This is deliberate — nodes and edges are forwarded to the workflow executor verbatim.
Routing
A route is a conditional branch out of a node. Wiring one up touches four places, and all four must agree or the route is orphaned:
1
Declare the route
Add an entry to the node’s routes, keyed by the route ID.
2
Back it with a boolean output variable
Add a bool variable to the node’s output_schema whose schema key is the route ID. This variable is what the node sets at runtime to decide whether the branch is taken.
3
Mark the node
Include route in the node’s properties.
4
Point the edges at it
Set route_id on each edge that belongs to the route. Use route_complement on the edge that should be taken when the route’s boolean is false.
{"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/create-workflow","slug":"/api-reference/v1-workflow-generation/create-workflow","pageMetadata":{"title":"Create a Workflow","api":"POST https://operator.opus.com/api/v1/workflow","description":"Create a workflow in a workspace, optionally pre-populated with nodes and edges","playground":"simple","href":"/api-reference/v1-workflow-generation/create-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: \"Create a workflow in a workspace, optionally pre-populated with nodes and edges\"\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`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseField,Step,Steps,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a workflow in the workspace named by the `,_jsx(_components.code,{children:`x-workspace-id`}),` header.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`nodes`}),` and `,_jsx(_components.code,{children:`edges`}),` are optional — omit them and Opus creates the workflow with an input node and an output node already wired, ready to open in the `,_jsx(_components.a,{href:`/guides/builder`,children:`Builder`}),`. Supply them to stand up a complete graph in a single call.`]}),`\n`,_jsxs(_components.p,{children:[`Requires the `,_jsx(_components.strong,{children:`Workflow: Full`}),` permission in the target workspace.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Prefer to describe the workflow in plain language instead of building the graph yourself? Use `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/generate-headless`,children:`Generate Workflow`}),` and let Opus AI agents design it for you.`]})}),`\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(ParamField,{header:`x-workspace-id`,type:`string`,required:true,id:`param-x-workspace-id`,children:_jsx(_components.p,{children:`UUID of the workspace to create the workflow in`})}),`\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. Each map `,_jsxs(_components.strong,{children:[`key must equal the `,_jsx(_components.code,{children:`id`}),` of the node it holds`]}),`.`]}),_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`}),`.`]}),_jsxs(Expandable,{title:`Node object`,children:[_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`Node ID (UUID). Must match the key this node is stored under.`})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-1`,children:_jsx(_components.p,{children:`Node name`})}),_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`Node type — for example `,_jsx(_components.code,{children:`input`}),`, `,_jsx(_components.code,{children:`output`}),`, `,_jsx(_components.code,{children:`agent`}),`, `,_jsx(_components.code,{children:`integration`}),`, `,_jsx(_components.code,{children:`code`})]})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description-1`,children:_jsx(_components.p,{children:`Node description`})}),_jsx(ParamField,{body:`handler_id`,type:`string`,id:`param-handler-id`,children:_jsx(_components.p,{children:`Handler ID`})}),_jsx(ParamField,{body:`handler_version_id`,type:`string`,id:`param-handler-version-id`,children:_jsx(_components.p,{children:`Handler version ID`})}),_jsx(ParamField,{body:`handler_active_id`,type:`string`,id:`param-handler-active-id`,children:_jsx(_components.p,{children:`Active handler ID`})}),_jsx(ParamField,{body:`handler_active_version_id`,type:`string`,id:`param-handler-active-version-id`,children:_jsx(_components.p,{children:`Active handler version ID`})}),_jsx(ParamField,{body:`handler_class`,type:`string`,id:`param-handler-class`,children:_jsxs(_components.p,{children:[`Which variety of this node type — it determines the shape of `,_jsx(_components.code,{children:`process`}),`. See `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/node-process-types`,children:`Node Process Types`}),`.`]})}),_jsx(ParamField,{body:`properties`,type:`string[]`,id:`param-properties`,children:_jsxs(_components.p,{children:[`Node properties. Set `,_jsx(_components.code,{children:`route`}),` when the node defines `,_jsx(_components.a,{href:`#routing`,children:`routes`}),`.`]})}),_jsx(ParamField,{body:`input_schema`,type:`object`,id:`param-input-schema`,children:_jsxs(_components.p,{children:[`Input variable schema — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas`,children:`Variable Schemas`})]})}),_jsx(ParamField,{body:`output_schema`,type:`object`,id:`param-output-schema`,children:_jsxs(_components.p,{children:[`Output variable schema — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas`,children:`Variable Schemas`})]})}),_jsx(ParamField,{body:`mappings`,type:`object`,id:`param-mappings`,children:_jsxs(_components.p,{children:[`Variable mappings — which upstream variable feeds each input. See `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas#connecting-variables-between-nodes`,children:`Connecting Variables Between Nodes`}),`.`]})}),_jsx(ParamField,{body:`process`,type:`object`,id:`param-process`,children:_jsxs(_components.p,{children:[`The step’s configuration. Its shape is determined by `,_jsx(_components.code,{children:`handler_class`}),` — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/node-process-types`,children:`Node Process Types`}),`.`]})}),_jsxs(ParamField,{body:`routes`,type:`object`,id:`param-routes`,children:[_jsxs(_components.p,{children:[`Conditional branches out of this node, keyed by route ID. Each map `,_jsxs(_components.strong,{children:[`key must equal the `,_jsx(_components.code,{children:`id`}),` of the route it holds`]}),`.`]}),_jsxs(Expandable,{title:`Route object`,children:[_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id-1`,children:_jsx(_components.p,{children:`Route ID. Must match the key this route is stored under.`})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-2`,children:_jsx(_components.p,{children:`Route name`})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description-2`,children:_jsx(_components.p,{children:`What this route is for`})})]})]}),_jsx(ParamField,{body:`set_values`,type:`object`,id:`param-set-values`,children:_jsxs(_components.p,{children:[`Fixed input/output values — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas#fixed-values`,children:`Fixed Values`})]})}),_jsxs(ParamField,{body:`position`,type:`object`,id:`param-position`,children:[_jsx(_components.p,{children:`Where the node sits on the Builder canvas. Both values are integers.`}),_jsxs(Expandable,{title:`Position object`,children:[_jsx(ParamField,{body:`x`,type:`integer`,required:true,id:`param-x`,children:_jsx(_components.p,{children:`Horizontal position`})}),_jsx(ParamField,{body:`y`,type:`integer`,required:true,id:`param-y`,children:_jsx(_components.p,{children:`Vertical position`})})]}),_jsx(_components.p,{children:`Omit it and the node is still valid — position is presentational only and never affects execution.`})]}),_jsx(ParamField,{body:`public_execution_settings`,type:`object`,id:`param-public-execution-settings`,children:_jsx(_components.p,{children:`Public execution settings`})})]})]}),`\n`,_jsxs(ParamField,{body:`edges`,type:`object`,id:`param-edges`,children:[_jsxs(_components.p,{children:[`Workflow edges keyed by edge ID. Each map `,_jsxs(_components.strong,{children:[`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`}),`.`]}),_jsxs(Expandable,{title:`Edge object`,children:[_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id-2`,children:_jsx(_components.p,{children:`Edge ID (UUID). Must match the key this edge is stored under.`})}),_jsx(ParamField,{body:`from_node_id`,type:`string`,required:true,id:`param-from-node-id`,children:_jsx(_components.p,{children:`Source node ID (UUID)`})}),_jsx(ParamField,{body:`to_node_id`,type:`string`,required:true,id:`param-to-node-id`,children:_jsx(_components.p,{children:`Target node ID (UUID)`})}),_jsx(ParamField,{body:`label`,type:`string`,id:`param-label`,children:_jsxs(_components.p,{children:[`Edge label. One of `,_jsx(_components.code,{children:`soft`}),` or `,_jsx(_components.code,{children:`hard`}),`.`]})}),_jsx(ParamField,{body:`route_id`,type:`string`,id:`param-route-id`,children:_jsx(_components.p,{children:`ID of the route this edge belongs to`})}),_jsx(ParamField,{body:`route_complement`,type:`boolean`,id:`param-route-complement`,children:_jsx(_components.p,{children:`Whether this edge is the complement of its route`})})]})]}),`\n`,_jsx(ParamField,{body:`activeStatus`,type:`string`,default:`inactive`,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`,_jsxs(ParamField,{body:`orgUnitIds`,type:`string[]`,id:`param-org-unit-ids`,children:[_jsx(_components.p,{children:`Org units to tag the new workflow to at creation. Maximum 100.`}),_jsx(_components.p,{children:`Tagging is best-effort: if a tag can’t be applied, the workflow is still created and the call still succeeds.`})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Node and edge objects use `,_jsx(_components.strong,{children:`snake_case`}),` keys (`,_jsx(_components.code,{children:`from_node_id`}),`, `,_jsx(_components.code,{children:`input_schema`}),`), while the top-level body fields use `,_jsx(_components.strong,{children:`camelCase`}),` (`,_jsx(_components.code,{children:`activeStatus`}),`, `,_jsx(_components.code,{children:`orgUnitIds`}),`). This is deliberate — nodes and edges are forwarded to the workflow executor verbatim.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`routing`,children:`Routing`}),`\n`,_jsx(_components.p,{children:`A route is a conditional branch out of a node. Wiring one up touches four places, and all four must agree or the route is orphaned:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Declare the route`,children:_jsxs(_components.p,{children:[`Add an entry to the node’s `,_jsx(_components.code,{children:`routes`}),`, keyed by the route ID.`]})}),_jsx(Step,{title:`Back it with a boolean output variable`,children:_jsxs(_components.p,{children:[`Add a `,_jsx(_components.code,{children:`bool`}),` variable to the node’s `,_jsx(_components.code,{children:`output_schema`}),` whose `,_jsx(_components.strong,{children:`schema key is the route ID`}),`. This variable is what the node sets at runtime to decide whether the branch is taken.`]})}),_jsx(Step,{title:`Mark the node`,children:_jsxs(_components.p,{children:[`Include `,_jsx(_components.code,{children:`route`}),` in the node’s `,_jsx(_components.code,{children:`properties`}),`.`]})}),_jsx(Step,{title:`Point the edges at it`,children:_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`route_id`}),` on each edge that belongs to the route. Use `,_jsx(_components.code,{children:`route_complement`}),` on the edge that should be taken when the route’s boolean is false.`]})})]}),`\n`,_jsx(CodeBlock,{filename:`routing`,numberOfLines:`20`,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:`20`,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:` \"routes\"`}),_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:` \"{ROUTE_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ROUTE_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Needs Approval\"`}),_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:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Taken when the amount exceeds the auto-approval limit\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"properties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"route\"`}),_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:` \"output_schema\"`}),_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:` \"schema\"`}),_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:` \"{ROUTE_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ROUTE_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:` \"variable_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"needs_approval\"`}),_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:` \"allowed_types\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bool\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"variable_addition_allowed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\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`]})})}),`\n`,_jsx(_components.p,{children:`The matching edges then carry the route:`}),`\n`,_jsx(CodeBlock,{filename:`edges`,numberOfLines:`15`,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:`15`,children:[_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:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"{EDGE_A}\"`}),_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{EDGE_A}\"`}),_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:` \"from_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{NODE_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:` \"to_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{APPROVAL_NODE_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:` \"route_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ROUTE_ID}\"`})]}),`\n`,_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:` \"{EDGE_B}\"`}),_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{EDGE_B}\"`}),_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:` \"from_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{NODE_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:` \"to_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{SKIP_NODE_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:` \"route_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ROUTE_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:` \"route_complement\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\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`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`workflowId`,type:`string`,required:true,id:`param-workflow-id`,children:_jsxs(_components.p,{children:[`The workflow ID. Use this as `,_jsx(_components.code,{children:`{workflowId}`}),` in `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/get-workflow-details`,children:`Get Workflow Details`}),`, `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/update-workflow`,children:`Update a Workflow`}),`, and `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/get-run-status`,children:`Get Run Status`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`entityId`,type:`string`,required:true,id:`param-entity-id`,children:_jsxs(_components.p,{children:[`The ID of the workflow’s entry in the Opus catalog. Most integrations only need `,_jsx(_components.code,{children:`workflowId`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`workflowVersionId`,type:`string`,required:true,id:`param-workflow-version-id`,children:_jsx(_components.p,{children:`The ID of the first workflow version`})}),`\n`,_jsx(ResponseField,{name:`builderType`,type:`string`,required:true,id:`param-builder-type`,children:_jsxs(_components.p,{children:[`Builder type. One of `,_jsx(_components.code,{children:`OPUS_V1`}),` or `,_jsx(_components.code,{children:`OPUS_V2`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsx(ResponseField,{name:`400`,type:`Bad Request`,id:`param-400`,children:_jsxs(_components.p,{children:[`Missing or malformed `,_jsx(_components.code,{children:`x-workspace-id`}),` header.`]})}),`\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 that workspace.`})}),`\n`,_jsx(ResponseField,{name:`404`,type:`Not Found`,id:`param-404`,children:_jsx(_components.p,{children:`The workspace or user 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":"Create a Workflow","api":"POST https://operator.opus.com/api/v1/workflow","description":"Create a workflow in a workspace, optionally pre-populated with nodes and edges","playground":"simple","href":"/api-reference/v1-workflow-generation/create-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,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Step,Steps,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a workflow in the workspace named by the `,_jsx(_components.code,{children:`x-workspace-id`}),` header.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`nodes`}),` and `,_jsx(_components.code,{children:`edges`}),` are optional — omit them and Opus creates the workflow with an input node and an output node already wired, ready to open in the `,_jsx(_components.a,{href:`/guides/builder`,children:`Builder`}),`. Supply them to stand up a complete graph in a single call.`]}),`\n`,_jsxs(_components.p,{children:[`Requires the `,_jsx(_components.strong,{children:`Workflow: Full`}),` permission in the target workspace.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Prefer to describe the workflow in plain language instead of building the graph yourself? Use `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/generate-headless`,children:`Generate Workflow`}),` and let Opus AI agents design it for you.`]})}),`\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(ParamField,{header:`x-workspace-id`,type:`string`,required:true,id:`param-x-workspace-id`,children:_jsx(_components.p,{children:`UUID of the workspace to create the workflow in`})}),`\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. Each map `,_jsxs(_components.strong,{children:[`key must equal the `,_jsx(_components.code,{children:`id`}),` of the node it holds`]}),`.`]}),_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`}),`.`]}),_jsxs(Expandable,{title:`Node object`,children:[_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`Node ID (UUID). Must match the key this node is stored under.`})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-1`,children:_jsx(_components.p,{children:`Node name`})}),_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`Node type — for example `,_jsx(_components.code,{children:`input`}),`, `,_jsx(_components.code,{children:`output`}),`, `,_jsx(_components.code,{children:`agent`}),`, `,_jsx(_components.code,{children:`integration`}),`, `,_jsx(_components.code,{children:`code`})]})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description-1`,children:_jsx(_components.p,{children:`Node description`})}),_jsx(ParamField,{body:`handler_id`,type:`string`,id:`param-handler-id`,children:_jsx(_components.p,{children:`Handler ID`})}),_jsx(ParamField,{body:`handler_version_id`,type:`string`,id:`param-handler-version-id`,children:_jsx(_components.p,{children:`Handler version ID`})}),_jsx(ParamField,{body:`handler_active_id`,type:`string`,id:`param-handler-active-id`,children:_jsx(_components.p,{children:`Active handler ID`})}),_jsx(ParamField,{body:`handler_active_version_id`,type:`string`,id:`param-handler-active-version-id`,children:_jsx(_components.p,{children:`Active handler version ID`})}),_jsx(ParamField,{body:`handler_class`,type:`string`,id:`param-handler-class`,children:_jsxs(_components.p,{children:[`Which variety of this node type — it determines the shape of `,_jsx(_components.code,{children:`process`}),`. See `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/node-process-types`,children:`Node Process Types`}),`.`]})}),_jsx(ParamField,{body:`properties`,type:`string[]`,id:`param-properties`,children:_jsxs(_components.p,{children:[`Node properties. Set `,_jsx(_components.code,{children:`route`}),` when the node defines `,_jsx(_components.a,{href:`#routing`,children:`routes`}),`.`]})}),_jsx(ParamField,{body:`input_schema`,type:`object`,id:`param-input-schema`,children:_jsxs(_components.p,{children:[`Input variable schema — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas`,children:`Variable Schemas`})]})}),_jsx(ParamField,{body:`output_schema`,type:`object`,id:`param-output-schema`,children:_jsxs(_components.p,{children:[`Output variable schema — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas`,children:`Variable Schemas`})]})}),_jsx(ParamField,{body:`mappings`,type:`object`,id:`param-mappings`,children:_jsxs(_components.p,{children:[`Variable mappings — which upstream variable feeds each input. See `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas#connecting-variables-between-nodes`,children:`Connecting Variables Between Nodes`}),`.`]})}),_jsx(ParamField,{body:`process`,type:`object`,id:`param-process`,children:_jsxs(_components.p,{children:[`The step’s configuration. Its shape is determined by `,_jsx(_components.code,{children:`handler_class`}),` — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/node-process-types`,children:`Node Process Types`}),`.`]})}),_jsxs(ParamField,{body:`routes`,type:`object`,id:`param-routes`,children:[_jsxs(_components.p,{children:[`Conditional branches out of this node, keyed by route ID. Each map `,_jsxs(_components.strong,{children:[`key must equal the `,_jsx(_components.code,{children:`id`}),` of the route it holds`]}),`.`]}),_jsxs(Expandable,{title:`Route object`,children:[_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id-1`,children:_jsx(_components.p,{children:`Route ID. Must match the key this route is stored under.`})}),_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name-2`,children:_jsx(_components.p,{children:`Route name`})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description-2`,children:_jsx(_components.p,{children:`What this route is for`})})]})]}),_jsx(ParamField,{body:`set_values`,type:`object`,id:`param-set-values`,children:_jsxs(_components.p,{children:[`Fixed input/output values — see `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/variable-schemas#fixed-values`,children:`Fixed Values`})]})}),_jsxs(ParamField,{body:`position`,type:`object`,id:`param-position`,children:[_jsx(_components.p,{children:`Where the node sits on the Builder canvas. Both values are integers.`}),_jsxs(Expandable,{title:`Position object`,children:[_jsx(ParamField,{body:`x`,type:`integer`,required:true,id:`param-x`,children:_jsx(_components.p,{children:`Horizontal position`})}),_jsx(ParamField,{body:`y`,type:`integer`,required:true,id:`param-y`,children:_jsx(_components.p,{children:`Vertical position`})})]}),_jsx(_components.p,{children:`Omit it and the node is still valid — position is presentational only and never affects execution.`})]}),_jsx(ParamField,{body:`public_execution_settings`,type:`object`,id:`param-public-execution-settings`,children:_jsx(_components.p,{children:`Public execution settings`})})]})]}),`\n`,_jsxs(ParamField,{body:`edges`,type:`object`,id:`param-edges`,children:[_jsxs(_components.p,{children:[`Workflow edges keyed by edge ID. Each map `,_jsxs(_components.strong,{children:[`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`}),`.`]}),_jsxs(Expandable,{title:`Edge object`,children:[_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id-2`,children:_jsx(_components.p,{children:`Edge ID (UUID). Must match the key this edge is stored under.`})}),_jsx(ParamField,{body:`from_node_id`,type:`string`,required:true,id:`param-from-node-id`,children:_jsx(_components.p,{children:`Source node ID (UUID)`})}),_jsx(ParamField,{body:`to_node_id`,type:`string`,required:true,id:`param-to-node-id`,children:_jsx(_components.p,{children:`Target node ID (UUID)`})}),_jsx(ParamField,{body:`label`,type:`string`,id:`param-label`,children:_jsxs(_components.p,{children:[`Edge label. One of `,_jsx(_components.code,{children:`soft`}),` or `,_jsx(_components.code,{children:`hard`}),`.`]})}),_jsx(ParamField,{body:`route_id`,type:`string`,id:`param-route-id`,children:_jsx(_components.p,{children:`ID of the route this edge belongs to`})}),_jsx(ParamField,{body:`route_complement`,type:`boolean`,id:`param-route-complement`,children:_jsx(_components.p,{children:`Whether this edge is the complement of its route`})})]})]}),`\n`,_jsx(ParamField,{body:`activeStatus`,type:`string`,default:`inactive`,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`,_jsxs(ParamField,{body:`orgUnitIds`,type:`string[]`,id:`param-org-unit-ids`,children:[_jsx(_components.p,{children:`Org units to tag the new workflow to at creation. Maximum 100.`}),_jsx(_components.p,{children:`Tagging is best-effort: if a tag can’t be applied, the workflow is still created and the call still succeeds.`})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Node and edge objects use `,_jsx(_components.strong,{children:`snake_case`}),` keys (`,_jsx(_components.code,{children:`from_node_id`}),`, `,_jsx(_components.code,{children:`input_schema`}),`), while the top-level body fields use `,_jsx(_components.strong,{children:`camelCase`}),` (`,_jsx(_components.code,{children:`activeStatus`}),`, `,_jsx(_components.code,{children:`orgUnitIds`}),`). This is deliberate — nodes and edges are forwarded to the workflow executor verbatim.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`routing`,children:`Routing`}),`\n`,_jsx(_components.p,{children:`A route is a conditional branch out of a node. Wiring one up touches four places, and all four must agree or the route is orphaned:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Declare the route`,children:_jsxs(_components.p,{children:[`Add an entry to the node’s `,_jsx(_components.code,{children:`routes`}),`, keyed by the route ID.`]})}),_jsx(Step,{title:`Back it with a boolean output variable`,children:_jsxs(_components.p,{children:[`Add a `,_jsx(_components.code,{children:`bool`}),` variable to the node’s `,_jsx(_components.code,{children:`output_schema`}),` whose `,_jsx(_components.strong,{children:`schema key is the route ID`}),`. This variable is what the node sets at runtime to decide whether the branch is taken.`]})}),_jsx(Step,{title:`Mark the node`,children:_jsxs(_components.p,{children:[`Include `,_jsx(_components.code,{children:`route`}),` in the node’s `,_jsx(_components.code,{children:`properties`}),`.`]})}),_jsx(Step,{title:`Point the edges at it`,children:_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`route_id`}),` on each edge that belongs to the route. Use `,_jsx(_components.code,{children:`route_complement`}),` on the edge that should be taken when the route’s boolean is false.`]})})]}),`\n`,_jsx(CodeBlock,{filename:`routing`,numberOfLines:`20`,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:`20`,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:` \"routes\"`}),_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:` \"{ROUTE_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ROUTE_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Needs Approval\"`}),_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:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Taken when the amount exceeds the auto-approval limit\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"properties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"route\"`}),_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:` \"output_schema\"`}),_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:` \"schema\"`}),_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:` \"{ROUTE_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ROUTE_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:` \"variable_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"needs_approval\"`}),_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:` \"allowed_types\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bool\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"variable_addition_allowed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\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`]})})}),`\n`,_jsx(_components.p,{children:`The matching edges then carry the route:`}),`\n`,_jsx(CodeBlock,{filename:`edges`,numberOfLines:`15`,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:`15`,children:[_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:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"{EDGE_A}\"`}),_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{EDGE_A}\"`}),_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:` \"from_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{NODE_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:` \"to_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{APPROVAL_NODE_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:` \"route_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ROUTE_ID}\"`})]}),`\n`,_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:` \"{EDGE_B}\"`}),_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{EDGE_B}\"`}),_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:` \"from_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{NODE_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:` \"to_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{SKIP_NODE_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:` \"route_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ROUTE_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:` \"route_complement\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\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`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`workflowId`,type:`string`,required:true,id:`param-workflow-id`,children:_jsxs(_components.p,{children:[`The workflow ID. Use this as `,_jsx(_components.code,{children:`{workflowId}`}),` in `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/get-workflow-details`,children:`Get Workflow Details`}),`, `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/update-workflow`,children:`Update a Workflow`}),`, and `,_jsx(_components.a,{href:`/api-reference/v1-workflow-generation/get-run-status`,children:`Get Run Status`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`entityId`,type:`string`,required:true,id:`param-entity-id`,children:_jsxs(_components.p,{children:[`The ID of the workflow’s entry in the Opus catalog. Most integrations only need `,_jsx(_components.code,{children:`workflowId`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`workflowVersionId`,type:`string`,required:true,id:`param-workflow-version-id`,children:_jsx(_components.p,{children:`The ID of the first workflow version`})}),`\n`,_jsx(ResponseField,{name:`builderType`,type:`string`,required:true,id:`param-builder-type`,children:_jsxs(_components.p,{children:[`Builder type. One of `,_jsx(_components.code,{children:`OPUS_V1`}),` or `,_jsx(_components.code,{children:`OPUS_V2`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsx(ResponseField,{name:`400`,type:`Bad Request`,id:`param-400`,children:_jsxs(_components.p,{children:[`Missing or malformed `,_jsx(_components.code,{children:`x-workspace-id`}),` header.`]})}),`\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 that workspace.`})}),`\n`,_jsx(ResponseField,{name:`404`,type:`Not Found`,id:`param-404`,children:_jsx(_components.p,{children:`The workspace or user does not exist.`})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`10`,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:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Minimal — Opus adds the input and output nodes for you`})}),`\n`,_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:` POST`}),_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`}),_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:` 'x-workspace-id: {YOUR_WORKSPACE_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:` '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:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`16`,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:`16`,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:`#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.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://operator.opus.com/api/v1/workflow\"`}),_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:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-workspace-id\"`}),_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_WORKSPACE_ID}`}),_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`,children:_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:` 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\"`}),_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:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Summarizes quarterly financial reports\"`}),_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:`\"inactive\"`}),_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:`15`,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:`15`,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:` 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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://operator.opus.com/api/v1/workflow\"`}),_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:` \"POST\"`}),_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:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-workspace-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{YOUR_WORKSPACE_ID}\"`}),_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:` \"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`,_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:`#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\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Summarizes quarterly financial reports\"`}),_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`]})})}),_jsx(CodeBlock,{filename:`With nodes and edges`,numberOfLines:`24`,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:`24`,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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Quarterly Report Processor\"`}),_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:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Summarizes quarterly financial reports\"`}),_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:` \"activeStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"inactive\"`}),_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:` \"nodes\"`}),_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:` \"{INPUT_NODE_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{INPUT_NODE_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Workflow Input\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"input\"`})]}),`\n`,_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:` \"{OUTPUT_NODE_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{OUTPUT_NODE_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Workflow Output\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"output\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"{EDGE_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{EDGE_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:` \"from_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{INPUT_NODE_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:` \"to_node_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{OUTPUT_NODE_ID}\"`})]}),`\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`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`201 Response`,numberOfLines:`6`,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:`6`,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:` \"entityId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{ENTITY_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:` \"workflowId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{WORKFLOW_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:` \"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:` \"builderType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPUS_V2\"`})]}),`\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":"Create a Workflow","api":"POST https://operator.opus.com/api/v1/workflow","description":"Create a workflow in a workspace, optionally pre-populated with nodes and edges","playground":"simple","href":"/api-reference/v1-workflow-generation/create-workflow"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":2,"children":[]},{"title":"Routing","slug":"routing","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=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># Minimal — Opus adds the input and output nodes for you\u003c/span>\u003c/span>\n\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\"> POST\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\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\"> 'x-workspace-id: {YOUR_WORKSPACE_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\"> '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\"> }'\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=\"16\">\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:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://operator.opus.com/api/v1/workflow\"\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\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\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\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-workspace-id\"\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_WORKSPACE_ID}\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\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\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\"\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\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Summarizes quarterly financial reports\"\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\">\"inactive\"\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=\"15\">\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:#0A3069;--shiki-dark:#CE9178\">\"https://operator.opus.com/api/v1/workflow\"\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\"> \"POST\"\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>\u003c/span>\n\u003cspan class=\"line\">\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\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-workspace-id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"{YOUR_WORKSPACE_ID}\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\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:#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\"\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:#0A3069;--shiki-dark:#CE9178\"> \"Summarizes quarterly financial reports\"\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>"},{"filename":"With nodes and edges","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=\"24\">\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\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Quarterly Report Processor\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"description\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Summarizes quarterly financial reports\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"activeStatus\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"inactive\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"nodes\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"{INPUT_NODE_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\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"{INPUT_NODE_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\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Workflow Input\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"input\"\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:#116329;--shiki-dark:#9CDCFE\"> \"{OUTPUT_NODE_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\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"{OUTPUT_NODE_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\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Workflow Output\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"output\"\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\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"edges\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"{EDGE_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\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"{EDGE_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\"> \"from_node_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"{INPUT_NODE_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\"> \"to_node_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"{OUTPUT_NODE_ID}\"\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\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"201 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=\"6\">\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\"> \"entityId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"{ENTITY_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\"> \"workflowId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"{WORKFLOW_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\"> \"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\"> \"builderType\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"OPUS_V2\"\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":"Create a Workflow","path":"/api/v1/workflow","servers":[{"url":"https://operator.opus.com"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"x-service-key":{"schema":[{"type":"string","description":"Your API authentication key","required":true}]},"x-workspace-id":{"schema":[{"type":"string","description":"UUID of the workspace to create the workflow in","required":true}]}},"cookie":{},"path":{}},"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":{"id":[{"type":"string","description":"Node ID (UUID). Must match the key this node is stored under.","required":true}],"name":[{"type":"string","description":"Node name","required":true}],"type":[{"type":"string","description":"Node type — for example `input` , `output` , `agent` , `integration` , `code`","required":true}],"description":[{"type":"string","description":"Node description"}],"handler_id":[{"type":"string","description":"Handler ID"}],"handler_version_id":[{"type":"string","description":"Handler version ID"}],"handler_active_id":[{"type":"string","description":"Active handler ID"}],"handler_active_version_id":[{"type":"string","description":"Active handler version ID"}],"handler_class":[{"type":"string","description":"Which variety of this node type — it determines the shape of `process` . See Node Process Types ."}],"properties":[{"type":"array","items":[{"type":"string"}],"description":"Node properties. Set `route` when the node defines routes ."}],"input_schema":[{"type":"object","properties":{},"description":"Input variable schema — see Variable Schemas"}],"output_schema":[{"type":"object","properties":{},"description":"Output variable schema — see Variable Schemas"}],"mappings":[{"type":"object","properties":{},"description":"Variable mappings — which upstream variable feeds each input. See Connecting Variables Between Nodes ."}],"process":[{"type":"object","properties":{},"description":"The step’s configuration. Its shape is determined by `handler_class` — see Node Process Types ."}],"routes":[{"type":"object","properties":{"id":[{"type":"string","description":"Route ID. Must match the key this route is stored under.","required":true}],"name":[{"type":"string","description":"Route name","required":true}],"description":[{"type":"string","description":"What this route is for"}]},"description":"Conditional branches out of this node, keyed by route ID. Each map key must equal the `id` of the route it holds ."}],"set_values":[{"type":"object","properties":{},"description":"Fixed input/output values — see Fixed Values"}],"position":[{"type":"object","properties":{"x":[{"type":"integer","description":"Horizontal position","required":true}],"y":[{"type":"integer","description":"Vertical position","required":true}]},"description":"Where the node sits on the Builder canvas. Both values are integers. Omit it and the node is still valid — position is presentational only and never affects execution."}],"public_execution_settings":[{"type":"object","properties":{},"description":"Public execution settings"}]},"description":"Workflow nodes keyed by node ID. Each map key must equal the `id` of the node it holds . A node’s `handler_class` determines the shape of its `process` — see Node Process Types ."}],"edges":[{"type":"object","properties":{"id":[{"type":"string","description":"Edge ID (UUID). Must match the key this edge is stored under.","required":true}],"from_node_id":[{"type":"string","description":"Source node ID (UUID)","required":true}],"to_node_id":[{"type":"string","description":"Target node ID (UUID)","required":true}],"label":[{"type":"string","description":"Edge label. One of `soft` or `hard` ."}],"route_id":[{"type":"string","description":"ID of the route this edge belongs to"}],"route_complement":[{"type":"boolean","description":"Whether this edge is the complement of its route"}]},"description":"Workflow edges keyed by edge ID. 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` ."}],"activeStatus":[{"type":"string","description":"Workflow active status. One of `active` or `inactive` ."}],"orgUnitIds":[{"type":"array","items":[{"type":"string"}],"description":"Org units to tag the new workflow to at creation. Maximum 100. Tagging is best-effort: if a tag can’t be applied, the workflow is still created and the call still succeeds."}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","description":"\u003cstring>","nodes":{"id":"\u003cstring>","name":"\u003cstring>","type":"\u003cstring>","description":"\u003cstring>","handler_id":"\u003cstring>","handler_version_id":"\u003cstring>","handler_active_id":"\u003cstring>","handler_active_version_id":"\u003cstring>","handler_class":"\u003cstring>","properties":["\u003cstring>"],"input_schema":{},"output_schema":{},"mappings":{},"process":{},"routes":{"id":"\u003cstring>","name":"\u003cstring>","description":"\u003cstring>"},"set_values":{},"position":{"x":123,"y":123},"public_execution_settings":{}},"edges":{"id":"\u003cstring>","from_node_id":"\u003cstring>","to_node_id":"\u003cstring>","label":"\u003cstring>","route_id":"\u003cstring>","route_complement":true},"activeStatus":"\u003cstring>","orgUnitIds":["\u003cstring>"]}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"400":[{"type":"object","properties":{},"description":"Missing or malformed `x-workspace-id` header."}],"401":[{"type":"object","properties":{},"description":"Missing, invalid, or expired API key."}],"403":[{"type":"object","properties":{},"description":"No access to that workspace."}],"404":[{"type":"object","properties":{},"description":"The workspace or user does not exist."}],"workflowId":[{"type":"string","description":"The workflow ID. Use this as `{workflowId}` in Get Workflow Details , Update a Workflow , and Get Run Status .","required":true}],"entityId":[{"type":"string","description":"The ID of the workflow’s entry in the Opus catalog. Most integrations only need `workflowId` .","required":true}],"workflowVersionId":[{"type":"string","description":"The ID of the first workflow version","required":true}],"builderType":[{"type":"string","description":"Builder type. One of `OPUS_V1` or `OPUS_V2` .","required":true}]}}],"examples":{"example":{"value":{"400":{},"401":{},"403":{},"404":{},"workflowId":"\u003cstring>","entityId":"\u003cstring>","workflowVersionId":"\u003cstring>","builderType":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"appliedai-7127e5be","siteName":"Opus Docs","title":"Create a Workflow - Opus Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-05T06:34:42.252Z","originalFileLocation":"api-reference/v1-workflow-generation/create-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=\"Create a workflow in a workspace, optionally pre-populated with nodes and edges\">\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=\"Create a Workflow - Opus Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a workflow in a workspace, optionally pre-populated with nodes and edges\">\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/create-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=Create+a+Workflow\u0026amp;description=Create+a+workflow+in+a+workspace%2C+optionally+pre-populated+with+nodes+and+edges\u0026amp;theme=7962c46fe7a071bfab35bbb3\u0026amp;signature=ad96fbc19d9cf7ed8808031524cf6f64a6f3752efb332fc3bad6711da8ecafb6\">\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=\"Create a Workflow - Opus Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a workflow in a workspace, optionally pre-populated with nodes and edges\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://appliedai-7127e5be.mintlify.site/_mintlify/api/og/v2?division=Workflows\u0026amp;title=Create+a+Workflow\u0026amp;description=Create+a+workflow+in+a+workspace%2C+optionally+pre-populated+with+nodes+and+edges\u0026amp;theme=7962c46fe7a071bfab35bbb3\u0026amp;signature=ad96fbc19d9cf7ed8808031524cf6f64a6f3752efb332fc3bad6711da8ecafb6\">\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/create-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/create-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/create-workflow#webpage\",\"url\":\"https://developer.opus.com/api-reference/v1-workflow-generation/create-workflow\",\"name\":\"Create a Workflow\",\"description\":\"Create a workflow in a workspace, optionally pre-populated with nodes and edges\",\"dateModified\":\"2026-10-05T06:34:42.252Z\",\"isPartOf\":{\"@id\":\"https://developer.opus.com#website\"},\"breadcrumb\":{\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/create-workflow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/create-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\":\"Create a Workflow\",\"item\":\"https://developer.opus.com/api-reference/v1-workflow-generation/create-workflow\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/create-workflow#apireference\",\"headline\":\"Create a Workflow\",\"name\":\"Create a Workflow\",\"description\":\"Create a workflow in a workspace, optionally pre-populated with nodes and edges\",\"url\":\"https://developer.opus.com/api-reference/v1-workflow-generation/create-workflow\",\"mainEntityOfPage\":{\"@id\":\"https://developer.opus.com/api-reference/v1-workflow-generation/create-workflow#webpage\"},\"dateModified\":\"2026-10-05T06:34:42.252Z\",\"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/create-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","description":"Create, read, update, archive and restore Opus workflows through the API","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}","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":"Create 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"]}