# Create a workflow Creates one or more flows, each defined by a name, optional description, and a hierarchical task tree. Request: items - List of flow definitions to create. Each item includes a name, optional description, and a taskTree defining the root action and any child/reference tasks. All flows are created in DRAFT status. groupId - Optional ID of a workflow template group. When provided, the platform also provisions any standard flows defined for that group, giving the organization a pre-configured starting set of workflows. Response: items - The fully hydrated Flow objects that were created, including their assigned IDs and complete task tree structures. Endpoint: POST /api/v1/flow/create Version: 3.0 Security: bearerAuth ## Request fields (application/json): - `items` (array) - `items.name` (string) Rule data fields - `items.description` (string) Rule data fields - `items.taskTree` (object) - `items.taskTree.actionId` (string) Rule data fields - `items.taskTree.reference` (string) Rule data fields - `items.taskTree.conditions` (string) Rule data fields - `items.taskTree.mappings` (object) - `items.taskTree.mappings.fields` (any) - `items.taskTree.children` (array) - `items.taskTree.configuration` (object) - `items.taskTree.references` (array) - `items.taskTree.referenceId` (string) Rule data fields - `groupId` (string) Rule data fields ## Response 200 fields (application/json): - `items` (array) - `items.id` (string) Rule data fields - `items.name` (string) Rule data fields - `items.description` (string) Rule data fields - `items.status` (integer) Enum: 0, 1, 2 - `items.taskTree` (object) - `items.taskTree.actionId` (string) Rule data fields - `items.taskTree.reference` (string) Rule data fields - `items.taskTree.conditions` (string) Rule data fields - `items.taskTree.mappings` (object) - `items.taskTree.mappings.fields` (any) - `items.taskTree.children` (array) - `items.taskTree.configuration` (object) - `items.taskTree.references` (array) - `items.taskTree.referenceId` (string) Rule data fields - `items.createdDt` (object) - `items.createdDt.seconds` (integer) - `items.createdDt.nanos` (integer) - `items.updatedDt` (object) ## Response 400 fields (application/json): - `message` (string) ## Response 401 fields (application/json): - `message` (string) ## Response 403 fields (application/json): - `message` (string) ## Response 404 fields (application/json): - `message` (string) ## Response 409 fields (application/json): - `message` (string) ## Response 429 fields (application/json): - `message` (string) ## Response 499 fields (application/json): - `message` (string) ## Response 500 fields (application/json): - `message` (string) ## Response 501 fields (application/json): - `message` (string) ## Response 503 fields (application/json): - `message` (string) ## Response 504 fields (application/json): - `message` (string)