curl --request POST \
--url https://api.example.com/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"nodes": [
{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"isStart": false,
"metadata": {},
"prompt": "<string>",
"messagePlan": {
"firstMessage": "<string>",
"idleMessages": [
"<string>"
],
"idleMessageMaxSpokenCount": 123
},
"variableExtractionPlan": {
"output": [
{
"title": "<string>",
"type": "string",
"enum": [
"<string>"
],
"description": "<string>"
}
]
},
"globalNodePlan": {
"enabled": true,
"enterCondition": "<string>"
},
"tool": {
"type": "<string>",
"tool_key": "<string>",
"function": {},
"messages": [
{}
],
"destinations": [
"<string>"
],
"parameters": {}
},
"tool_instances": [
{
"instance_name": "<string>",
"parameters": {}
}
],
"config": {}
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"condition": "always"
}
],
"description": "<string>",
"global_nodes": [
"<string>"
],
"globalPrompt": "<string>"
}
'