Crego APIs
APIs DocHome Page
Web Apps
  • Jupiter
  • Venus
APIs DocHome Page
Web Apps
  • Jupiter
  • Venus
  1. Flow
  • Back to home
  • Omni
  • Installation
  • Document APIs
  • Contact APIs
  • Audit APIs
  • Core APIs
    • Get Enums
      GET
  • Review
  • Workflow
    • Runner
      • Create Runner
      • Retrieve Runner
      • Executer
    • Flow
      • Create Flow
        POST
  1. Flow

Create Flow

Developing
preprod
https://preprod.api.crego.io
preprod
https://preprod.api.crego.io
POST
/workflows/
Last modified:2025-07-22 05:16:26

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
object {0}
Example
{
    "content_type": "product",
    "init_node": "init",
    "graph": {
        "nodes": {
            "init": {
                "type": "web_form",
                "config": {
                    "forms": [
                        {
                            "action": "submit",
                            "schema": {
                                "title": "Add New Product",
                                "description": "Fill in the information to add a new product",
                                "type": "object",
                                "properties": {
                                    "product": {
                                        "type": "object",
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "title": "Product Name",
                                                "minLength": 1
                                            },
                                            "ref_id": {
                                                "type": "string",
                                                "title": "Reference ID",
                                                "description": "Identifier for internal reference",
                                                "minLength": 1
                                            },
                                            "status": {
                                                "type": "string",
                                                "title": "Status",
                                                "enum": [
                                                    "active",
                                                    "inactive"
                                                ],
                                                "enumNames": [
                                                    "Active",
                                                    "Inactive"
                                                ],
                                                "default": "active"
                                            },
                                            "tags": {
                                                "type": "string",
                                                "title": "Tags",
                                                "description": "Enter tags separated by commas",
                                                "default": ""
                                            },
                                            "refs": {
                                                "type": "string",
                                                "title": "Product References",
                                                "description": "Enter key-value pairs separated by commas (e.g., key1:value1, key2:value2)",
                                                "default": ""
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "ref_id"
                                        ]
                                    }
                                }
                            },
                            "ui": {
                                "product": {
                                    "ui:label": false,
                                    "name": {
                                        "ui:widget": "text",
                                        "ui:placeholder": "Enter product name"
                                    },
                                    "ref_id": {
                                        "ui:widget": "text",
                                        "ui:placeholder": "Enter reference ID"
                                    },
                                    "status": {
                                        "ui:widget": "radio",
                                        "ui:options": {
                                            "inline": true
                                        }
                                    },
                                    "tags": {
                                        "ui:widget": "textarea",
                                        "ui:placeholder": "Add tags...",
                                        "ui:options": {
                                            "rows": 3
                                        }
                                    },
                                    "refs": {
                                        "ui:widget": "textarea",
                                        "ui:placeholder": "Enter key-value pairs (e.g., key1:value1, key2:value2)",
                                        "ui:options": {
                                      

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://preprod.api.crego.io/workflows/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "content_type": "product",
    "init_node": "init",
    "graph": {
        "nodes": {
            "init": {
                "type": "web_form",
                "config": {
                    "forms": [
                        {
                            "action": "submit",
                            "schema": {
                                "title": "Add New Product",
                                "description": "Fill in the information to add a new product",
                                "type": "object",
                                "properties": {
                                    "product": {
                                        "type": "object",
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "title": "Product Name",
                                                "minLength": 1
                                            },
                                            "ref_id": {
                                                "type": "string",
                                                "title": "Reference ID",
                                                "description": "Identifier for internal reference",
                                                "minLength": 1
                                            },
                                            "status": {
                                                "type": "string",
                                                "title": "Status",
                                                "enum": [
                                                    "active",
                                                    "inactive"
                                                ],
                                                "enumNames": [
                                                    "Active",
                                                    "Inactive"
                                                ],
                                                "default": "active"
                                            },
                                            "tags": {
                                                "type": "string",
                                                "title": "Tags",
                                                "description": "Enter tags separated by commas",
                                                "default": ""
                                            },
                                            "refs": {
                                                "type": "string",
                                                "title": "Product References",
                                                "description": "Enter key-value pairs separated by commas (e.g., key1:value1, key2:value2)",
                                                "default": ""
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "ref_id"
                                        ]
                                    }
                                }
                            },
                            "ui": {
                                "product": {
                                    "ui:label": false,
                                    "name": {
                                        "ui:widget": "text",
                                        "ui:placeholder": "Enter product name"
                                    },
                                    "ref_id": {
                                        "ui:widget": "text",
                                        "ui:placeholder": "Enter reference ID"
                                    },
                                    "status": {
                                        "ui:widget": "radio",
                                        "ui:options": {
                                            "inline": true
                                        }
                                    },
                                    "tags": {
                                        "ui:widget": "textarea",
                                        "ui:placeholder": "Add tags...",
                                        "ui:options": {
                                            "rows": 3
                                        }
                                    },
                                    "refs": {
                                        "ui:widget": "textarea",
                                        "ui:placeholder": "Enter key-value pair

Responses

🟢201Created
application/json
Body
id
string 
required
created_at
string 
required
updated_at
string 
required
resource
string 
required
init_node
string 
required
graph
object 
required
nodes
object 
required
start_node
string 
required
params
null 
required
secret
object 
required
url
string 
required
created_by
string 
required
updated_by
null 
required
Example
{
    "id": "string",
    "created_at": "string",
    "updated_at": "string",
    "resource": "string",
    "init_node": "string",
    "graph": {
        "nodes": {
            "init": {
                "type": "string",
                "config": {
                    "forms": [
                        {
                            "action": "string",
                            "schema": {
                                "title": "string",
                                "description": "string",
                                "type": "string",
                                "properties": {
                                    "product": {
                                        "type": "string",
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "title": "string",
                                                "minLength": 0
                                            },
                                            "ref_id": {
                                                "type": "string",
                                                "title": "string",
                                                "description": "string",
                                                "minLength": 0
                                            },
                                            "status": {
                                                "type": "string",
                                                "title": "string",
                                                "enum": [
                                                    "string"
                                                ],
                                                "enumNames": [
                                                    "string"
                                                ],
                                                "default": "string"
                                            },
                                            "tags": {
                                                "type": "string",
                                                "title": "string",
                                                "description": "string",
                                                "default": "string"
                                            },
                                            "refs": {
                                                "type": "string",
                                                "title": "string",
                                                "description": "string",
                                                "default": "string"
                                            }
                                        },
                                        "required": [
                                            "string"
                                        ]
                                    }
                                }
                            },
                            "ui": {
                                "product": {
                                    "ui:label": true,
                                    "name": {
                                        "ui:widget": "string",
                                        "ui:placeholder": "string"
                                    },
                                    "ref_id": {
                                        "ui:widget": "string",
                                        "ui:placeholder": "string"
                                    },
                                    "status": {
                                        "ui:widget": "string",
                                        "ui:options": {
                                            "inline": true
                                        }
                                    },
                                    "tags": {
                                        "ui:widget": "string",
                                        "ui:placeholder": "string",
                                        "ui:options": {
                                            "rows": 0
                                        }
                                    },
                                    "refs": {
                                        "ui:widget": "string",
                                        "ui:placeholder": "string",
                                        "ui:options": {
                                            "rows": 0
                                        }
                                    }
                                }
                            }
                        }
                    ]
                },
                "permissions": [
                    {
                        "roles": [
                            "string"
                        ],
                        "actions": [
                            "string"
                        ]
                    }
                ],
                "edges": [
                    {
                        "action": "string",
                        "update_store": {
                            "templates": [
                                {
                                    "template": {
                                        "path": "string",
                                        "value": "string"
                                    },
                                    "parser": "string"
                                }
                            ],
                            "parser": "string"
                        },
                        "target_node": "string"
                    }
                ]
            },
            "product_config": {
                "type": "string",
                "config": {
                    "forms": [
                        {
                            "action": "string",
                            "schema": {
                                "title": "string",
                                "description": "string",
                                "type": "string",
                                "properties": {
                                    "config": {
                                        "type": "string",
                                        "properties": {
                                            "is_multi_loan": {
                                                "type": "string",
                                                "title": "string",
                                                "default": true
                                            },
                                            "is_multi_tranche": {
                                                "type": "string",
                                                "title": "string",
                                                "default": true
                                            },
                                            "schedule": {
                                                "type": "string",
                                                "title": "string",
                                                "properties": {
                                                    "pre_emi_count": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "minimum": 0,
                                                        "default": 0
                                                    },
                                                    "frequency": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    },
                                                    "schedule_count": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "minimum": 0,
                                                        "default": 0
                                                    },
                                                    "include_start_date": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "default": true
                                                    },
                                                    "days_in_month": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    },
                                                    "days_in_year": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    },
                                                    "bpi_settlement": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "items": {
                                                            "enum": []
                                                        },
                                                        "uniqueItems": true,
                                                        "default": [
                                                            null
                                                        ]
                                                    },
                                                    "roi": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "properties": {
                                                            "rate_type": {},
                                                            "base_rate": {},
                                                            "spread": {},
                                                            "shares": {}
                                                        },
                                                        "required": [
                                                            null
                                                        ]
                                                    },
                                                    "expression_order": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "items": {
                                                            "enum": []
                                                        },
                                                        "uniqueItems": true,
                                                        "default": [
                                                            null
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "string"
                                                ]
                                            },
                                            "tenure": {
                                                "type": "string",
                                                "title": "string",
                                                "properties": {
                                                    "value": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "minimum": 0,
                                                        "default": 0
                                                    },
                                                    "unit": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    },
                                                    "days_in_month_calculation": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    },
                                                    "days_in_year_calculation": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    }
                                                },
                                                "required": [
                                                    "string"
                                                ]
                                            },
                                            "common_settings": {
                                                "type": "string",
                                                "title": "string",
                                                "properties": {
                                                    "tax_label": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "default": "string"
                                                    },
                                                    "currency_code": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    },
                                                    "decimal_precision": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "minimum": 0,
                                                        "maximum": 0,
                                                        "default": 0
                                                    },
                                                    "rounding_method": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    },
                                                    "holiday_calendar_type": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "enum": [
                                                            null
                                                        ],
                                                        "enumNames": [
                                                            null
                                                        ],
                                                        "default": "string"
                                                    },
                                                    "npa_threshold_dpd": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "minimum": 0,
                                                        "default": 0
                                                    },
                                                    "business_days": {
                                                        "type": "string",
                                                        "title": "string",
                                                        "items": {
                                                            "enum": []
                                                        },
                                                        "uniqueItems": true,
                                                        "default": [
                                                            null
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "string"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "string"
                                        ]
                                    }
                                }
                            },
                            "ui": {
                                "config": {
                                    "ui:label": true,
                                    "is_multi_loan": {
                                        "ui:widget": "string",
                                        "ui:options": {
                                            "inline": true
                                        }
                                    },
                                    "is_multi_tranche": {
                                        "ui:widget": "string",
                                        "ui:options": {
                                            "inline": true
                                        }
                                    },
                                    "schedule": {
                                        "pre_emi_count": {
                                            "ui:widget": "string"
                                        },
                                        "frequency": {
                                            "ui:widget": "string"
                                        },
                                        "schedule_count": {
                                            "ui:widget": "string"
                                        },
                                        "include_start_date": {
                                            "ui:widget": "string",
                                            "ui:options": {
                                                "inline": true
                                            }
                                        },
                                        "days_in_month": {
                                            "ui:widget": "string",
                                            "ui:options": {
                                                "inline": true
                                            }
                                        },
                                        "days_in_year": {
                                            "ui:widget": "string",
                                            "ui:options": {
                                                "inline": true
                                            }
                                        },
                                        "bpi_settlement": {
                                            "ui:widget": "string",
                                            "ui:options": {
                                                "inline": true
                                            }
                                        },
                                        "roi": {
                                            "rate_type": {
                                                "ui:widget": "string",
                                                "ui:options": {
                                                    "inline": true
                                                }
                                            },
                                            "base_rate": {
                                                "ui:widget": "string",
                                                "ui:options": {
                                                    "step": 0
                                                }
                                            },
                                            "spread": {
                                                "ui:widget": "string",
                                                "ui:options": {
                                                    "step": 0
                                                }
                                            },
                                            "shares": {
                                                "ui:options": {
                                                    "addable": true,
                                                    "orderable": true,
                                                    "removable": true
                                                },
                                                "items": {
                                                    "share_code": {
                                                        "ui:widget": "string",
                                                        "ui:placeholder": "string"
                                                    },
                                                    "percentage_share": {
                                                        "ui:widget": "string",
                                                        "ui:options": {}
                                                    }
                                                }
                                            }
                                        },
                                        "expression_order": {
                                            "ui:widget": "string",
                                            "ui:options": {
                                                "inline": true
                                            }
                                        }
                                    },
                                    "tenure": {
                                        "value": {
                                            "ui:widget": "string"
                                        },
                                        "unit": {
                                            "ui:widget": "string"
                                        },
                                        "days_in_month_calculation": {
                                            "ui:widget": "string",
                                            "ui:options": {
                                                "inline": true
                                            }
                                        },
                                        "days_in_year_calculation": {
                                            "ui:widget": "string",
                                            "ui:options": {
                                                "inline": true
                                            }
                                        }
                                    },
                                    "common_settings": {
                                        "tax_label": {
                                            "ui:widget": "string",
                                            "ui:placeholder": "string"
                                        },
                                        "currency_code": {
                                            "ui:widget": "string"
                                        },
                                        "decimal_precision": {
                                            "ui:widget": "string"
                                        },
                                        "rounding_method": {
                                            "ui:widget": "string"
                                        },
                                        "holiday_calendar_type": {
                                            "ui:widget": "string"
                                        },
                                        "npa_threshold_dpd": {
                                            "ui:widget": "string"
                                        },
                                        "business_days": {
                                            "ui:widget": "string",
                                            "ui:options": {
                                                "inline": true
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    ]
                },
                "permissions": [
                    {
                        "roles": [
                            "string"
                        ],
                        "actions": [
                            "string"
                        ]
                    }
                ],
                "edges": [
                    {
                        "action": "string",
                        "update_store": {
                            "templates": [
                                {
                                    "template": {
                                        "path": "string",
                                        "value": "string"
                                    },
                                    "parser": "string"
                                }
                            ],
                            "parser": "string"
                        },
                        "target_node": "string"
                    }
                ]
            },
            "pending_approval": {
                "type": "string",
                "config": {
                    "forms": [
                        {
                            "type": "string",
                            "layout": [
                                {
                                    "type": "string",
                                    "title": "string",
                                    "className": "string",
                                    "elements": [
                                        {
                                            "type": "string",
                                            "data": [
                                                {
                                                    "label": "string",
                                                    "value": "string"
                                                }
                                            ]
                                        }
                                    ],
                                    "data": "string",
                                    "body": [
                                        {
                                            "head": "string",
                                            "value": "string",
                                            "type": "string",
                                            "transform": "string",
                                            "className": "string",
                                            "targetOnRefresh": "string",
                                            "items": [
                                                {
                                                    "icon": "string",
                                                    "className": "string",
                                                    "tooltip": "string",
                                                    "title": "string",
                                                    "condition": [
                                                        "string"
                                                    ],
                                                    "form": {
                                                        "action": "string",
                                                        "start_node": "string",
                                                        "path": "string",
                                                        "schema": {
                                                            "properties": {},
                                                            "required": []
                                                        },
                                                        "ui": {
                                                            "comment": {},
                                                            "status": {}
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                },
                "permissions": [
                    {
                        "roles": [
                            "string"
                        ],
                        "actions": [
                            "string"
                        ]
                    }
                ],
                "edges": [
                    {
                        "action": "string",
                        "condition": {
                            "template": "string",
                            "parser": "string"
                        },
                        "target_node": "string",
                        "update_store": {
                            "templates": [
                                {
                                    "template": {
                                        "path": "string",
                                        "value": {
                                            "product_details": "string",
                                            "configuration": "string",
                                            "approval_details": "string",
                                            "created_at": "string",
                                            "status": "string"
                                        }
                                    },
                                    "parser": "string"
                                }
                            ],
                            "parser": "string"
                        }
                    }
                ]
            },
            "active": {
                "type": "string",
                "config": {
                    "forms": [
                        {
                            "type": "string",
                            "layout": [
                                {
                                    "className": "string",
                                    "elements": [
                                        {
                                            "type": "string",
                                            "className": "string",
                                            "style": "string",
                                            "tag": "string",
                                            "text": "string",
                                            "title": "string",
                                            "data": [
                                                {
                                                    "label": "string",
                                                    "value": "string"
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                },
                "permissions": [
                    {
                        "roles": [
                            "string"
                        ],
                        "actions": [
                            "string"
                        ]
                    }
                ],
                "edges": [
                    null
                ]
            },
            "product_rejected": {
                "type": "string",
                "config": {
                    "forms": [
                        {
                            "type": "string",
                            "layout": [
                                {
                                    "className": "string",
                                    "elements": [
                                        {
                                            "type": "string",
                                            "className": "string",
                                            "style": "string",
                                            "tag": "string",
                                            "text": "string",
                                            "variant": "string",
                                            "title": "string",
                                            "items": [
                                                {
                                                    "action": "string",
                                                    "className": "string",
                                                    "target_node": "string",
                                                    "text": "string"
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                },
                "permissions": [
                    {
                        "roles": [
                            "string"
                        ],
                        "actions": [
                            "string"
                        ]
                    }
                ]
            }
        },
        "start_node": "string"
    },
    "params": null,
    "secret": {
        "url": "string"
    },
    "created_by": "string",
    "updated_by": null
}
Modified at 2025-07-22 05:16:26
Previous
Executer
Built with