Skip to main content
POST
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.
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.
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.
routing
The matching edges then carry the route:
edges

Response

string
required
The workflow ID. Use this as {workflowId} in Get Workflow Details, Update a Workflow, and Get Run Status.
string
required
The ID of the workflow’s entry in the Opus catalog. Most integrations only need workflowId.
string
required
The ID of the first workflow version
string
required
Builder type. One of OPUS_V1 or OPUS_V2.

Errors

Bad Request
Missing or malformed x-workspace-id header.
Unauthorized
Missing, invalid, or expired API key.
Forbidden
No access to that workspace.
Not Found
The workspace or user does not exist.