> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/workflow/create-workflow.md).

# Create Workflow

Create a new workflow in your workspace. The request body must be the **full workflow graph** — name, nodes, edges, startNode, trigger, and settings. A minimal `{ "name": "..." }` stub is not sufficient.

The response returns `data.id` (use for all subsequent operations) and `data.checksum` (required for update, test, and publish).

## Create workflow

> Create a new workflow. The request body must be the \*\*full workflow graph\*\* — not a minimal stub.\
> \
> \*\*Required fields:\*\* \`name\`, \`nodes\` (must include the trigger node \`id: "1"\`), \`edges\`, \`startNode\`, \`trigger\`.\
> \
> \*\*Optional fields:\*\* \`description\`, \`comment\`, \`isEnabled\` (default \`true\`), \`settings\` (\`auditIO\`, \`dateFormat\`, \`timezone\`), \`dependencyMap\`.\
> \
> \*\*Node structure:\*\*\
> \- Every workflow must have a trigger node with \`id: "1"\`, \`type: "trigger"\`, \`data.nodeType: "apiTrigger"\`. Its \`data.input\` map defines the API input schema — each key is a field name with \`dataType\`, \`executedValue\` (test sample), and metadata.\
> \- \`startNode\` must point to the first non-trigger executable node (skip \`addNode\` / \`addNodeMd\` UI placeholders).\
> \- \`trigger\` is always \`{ "apiNode": "1" }\`.\
> \
> \*\*Checksum:\*\* On success, \`data.id\` is the workflow entity ID (use for all subsequent calls) and \`data.checksum\` must be stored — required for update, test, and publish.\
> \
> \*\*Create body ≈ GET \`data\` minus server fields\*\* (\`id\`, \`checksum\`, \`version\`, \`status\`, \`staticUrl\`, \`versionInfo\`, timestamps).\
> \
> \*\*Canonical request body:\*\* \`Create/create\_workflow\.json\`

```json
{"openapi":"3.0.3","info":{"title":"Nected Workflow API (Dev V1)","version":"1.0"},"tags":[{"name":"Workflow","description":"List, create, read, update, test, and publish workflows."}],"servers":[{"url":"https://api.nected.ai","description":"Production"}],"security":[{"DevAuth":[]}],"components":{"securitySchemes":{"DevAuth":{"type":"apiKey","in":"header","name":"Nected-API-Key","description":"Your Nected API key. Obtain from your workspace settings."}},"schemas":{"CreateWorkflowPayload":{"type":"object","description":"Request body for Create workflow.\n\n**Required fields:** `name`, `nodes` (must include the trigger node with `id: \"1\"`), `edges`, `startNode`, `trigger`.\n\nThe full shape must match what you see in **Get workflow by id** `data` (minus server-only fields like `id`, `checksum`, `version`, `status`, `staticUrl`, `versionInfo`, and timestamps).\n\nCanonical file: `Create/create_workflow.json`.","additionalProperties":true,"required":["name","nodes","edges","startNode","trigger"],"properties":{"name":{"type":"string","description":"Workflow name (must be unique in the workspace)"},"description":{"type":"string"},"startNode":{"type":"string","description":"ID of the first non-trigger node to execute"},"nodes":{"type":"array","description":"All nodes — must include the trigger node (`id = \"1\"`)","items":{"$ref":"#/components/schemas/WorkflowNode"}},"edges":{"type":"array","description":"All directed connections between nodes","items":{"$ref":"#/components/schemas/WorkflowEdge"}},"trigger":{"type":"object","properties":{"apiNode":{"type":"string"}}},"comment":{"type":"string"},"isEnabled":{"type":"boolean","default":true},"settings":{"$ref":"#/components/schemas/WorkflowSettings"},"dependencyMap":{"type":"array","items":{}}}},"WorkflowNode":{"type":"object","description":"A node in the workflow graph. The `type` field determines what `data.nodeType` can be:\n- `trigger` — the API entry point (`nodeType: apiTrigger`). Always `id: \"1\"`.\n- `codeNode` — runs an inline code snippet (`nodeType: codeNode`).\n- `addNode` — UI placeholder node for connecting segments (`nodeType: addNodeMd`).\n- Other types: `ruleNode`, `connectorNode`, `responseNode`, `setVariableNode`, etc.","additionalProperties":true,"properties":{"id":{"type":"string","description":"Unique node ID within this workflow"},"type":{"type":"string","description":"Node type (trigger, codeNode, addNode, ruleNode, etc.)"},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"style":{"nullable":true},"sourcePosition":{"type":"string","enum":["bottom","right"]},"targetPosition":{"type":"string","enum":["top","left"]},"draggable":{"type":"boolean"},"data":{"$ref":"#/components/schemas/WorkflowNodeData"}}},"WorkflowNodeData":{"type":"object","description":"Node-specific data. Shape varies by `nodeType`.","additionalProperties":true,"properties":{"nodeType":{"type":"string","description":"e.g. apiTrigger, codeNode, addNodeMd, ruleNode, connectorNode"},"name":{"type":"string","description":"Display name of the node"},"entity":{"type":"string"},"entityId":{"type":"string"},"pluginName":{"type":"string"},"status":{"type":"string","description":"Last execution status (success, error, etc.)"},"rootId":{"type":"string"},"sourceIds":{"nullable":true},"isMergeNode":{"type":"boolean"},"switcher":{"nullable":true},"conditions":{"nullable":true},"blockName":{"type":"string"},"input":{"type":"object","nullable":true,"description":"Input parameter definitions keyed by field name","additionalProperties":{"$ref":"#/components/schemas/NodeInputField"}},"output":{"nullable":true},"settings":{"type":"object","nullable":true,"description":"Node-level settings (varies by nodeType)"},"executedValue":{"description":"Last execution output (populated after test run)","nullable":true},"runInLoop":{"$ref":"#/components/schemas/RunInLoop"}}},"NodeInputField":{"type":"object","description":"Definition of a single input field on a node","additionalProperties":true,"properties":{"name":{"type":"string"},"dataType":{"type":"string","description":"e.g. string, numeric, boolean, json, list"},"executedValue":{"description":"Value used during the last test execution"},"isCaseSensitive":{"type":"boolean"},"isNullable":{"type":"boolean"},"isOptional":{"type":"boolean"},"keyAttribute":{"type":"string"},"keySource":{"type":"string"},"mapping":{"type":"boolean"},"notSend":{"type":"boolean"},"order":{"type":"integer"},"schemaId":{"type":"string"},"sendNull":{"type":"boolean"},"source":{"type":"string"},"attribute":{"type":"string"},"value":{"description":"Static value or expression; null when sourced dynamically"}}},"RunInLoop":{"type":"object","description":"Loop configuration for iterating over a list","properties":{"status":{"type":"boolean","description":"Whether this node runs in a loop"},"source":{"type":"string"},"attribute":{"type":"string"},"value":{"nullable":true}}},"WorkflowEdge":{"type":"object","description":"A directed connection between two nodes","properties":{"id":{"type":"string"},"source":{"type":"string","description":"ID of the source node"},"target":{"type":"string","description":"ID of the target node"},"type":{"type":"string"},"animated":{"type":"boolean"},"label":{"type":"string"},"markerEnd":{"type":"string"},"sourceHandle":{"type":"string"},"style":{"type":"object","properties":{"stroke":{"type":"string"},"strokeWidth":{"type":"number"}}},"data":{"type":"object","properties":{"edgeType":{"type":"string","description":"e.g. `then`, `else`"},"pathId":{"type":"string"}}}}},"WorkflowSettings":{"type":"object","description":"Runtime settings for the workflow","properties":{"auditIO":{"type":"boolean","description":"Whether to record input/output for audit logs"},"dateFormat":{"type":"string","description":"Date format locale (e.g. `in` for India)"},"timezone":{"type":"string","description":"IANA timezone string (e.g. `Asia/Kolkata`)"}}},"CreateWorkflowResponse":{"type":"object","description":"Success response for POST /dev/v1/workflow","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Entity ID of the created workflow — use for all subsequent operations"},"checksum":{"type":"string","description":"Checksum for subsequent update/test/publish"}}},"code":{"type":"string"},"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error response wrapper","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Human-readable error message"},"data":{"nullable":true}}}}},"paths":{"/dev/v1/workflow":{"post":{"operationId":"createWorkflow","tags":["Workflow"],"summary":"Create workflow","description":"Create a new workflow. The request body must be the **full workflow graph** — not a minimal stub.\n\n**Required fields:** `name`, `nodes` (must include the trigger node `id: \"1\"`), `edges`, `startNode`, `trigger`.\n\n**Optional fields:** `description`, `comment`, `isEnabled` (default `true`), `settings` (`auditIO`, `dateFormat`, `timezone`), `dependencyMap`.\n\n**Node structure:**\n- Every workflow must have a trigger node with `id: \"1\"`, `type: \"trigger\"`, `data.nodeType: \"apiTrigger\"`. Its `data.input` map defines the API input schema — each key is a field name with `dataType`, `executedValue` (test sample), and metadata.\n- `startNode` must point to the first non-trigger executable node (skip `addNode` / `addNodeMd` UI placeholders).\n- `trigger` is always `{ \"apiNode\": \"1\" }`.\n\n**Checksum:** On success, `data.id` is the workflow entity ID (use for all subsequent calls) and `data.checksum` must be stored — required for update, test, and publish.\n\n**Create body ≈ GET `data` minus server fields** (`id`, `checksum`, `version`, `status`, `staticUrl`, `versionInfo`, timestamps).\n\n**Canonical request body:** `Create/create_workflow.json`","parameters":[{"name":"Nected-Branch","in":"header","required":false,"description":"Branch name (optional)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowPayload"}}}},"responses":{"201":{"description":"Created — returns `data.id` and `data.checksum`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

### Example request body (full JSON)

{% file src="/files/1x5E4z4Acu7kou5rZPvh" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nected.ai/nected-docs/management-api/workflow/create-workflow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
