curl --request POST \
--url https://api.example.com/api/v1/chatflows \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"flowData": "<string>",
"type": "<string>",
"deployed": true,
"isPublic": true,
"apikeyid": "<string>",
"chatbotConfig": "<string>",
"apiConfig": "<string>",
"analytic": "<string>",
"speechToText": "<string>",
"textToSpeech": "<string>",
"followUpPrompts": "<string>",
"category": "<string>"
}
'{
"400": {},
"401": {},
"403": {},
"404": {},
"412": {},
"500": {},
"id": "<string>",
"name": "<string>",
"flowData": "<string>",
"deployed": true,
"isPublic": true,
"type": "<string>",
"workspaceId": "<string>",
"createdDate": "<string>",
"updatedDate": "<string>"
}Create a new chatflow in your workspace
curl --request POST \
--url https://api.example.com/api/v1/chatflows \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"flowData": "<string>",
"type": "<string>",
"deployed": true,
"isPublic": true,
"apikeyid": "<string>",
"chatbotConfig": "<string>",
"apiConfig": "<string>",
"analytic": "<string>",
"speechToText": "<string>",
"textToSpeech": "<string>",
"followUpPrompts": "<string>",
"category": "<string>"
}
'{
"400": {},
"401": {},
"403": {},
"404": {},
"412": {},
"500": {},
"id": "<string>",
"name": "<string>",
"flowData": "<string>",
"deployed": true,
"isPublic": true,
"type": "<string>",
"workspaceId": "<string>",
"createdDate": "<string>",
"updatedDate": "<string>"
}chatflows:create, chatflows:update, agentflows:create, or agentflows:updateCHATFLOW - Standard conversational flowAGENTFLOW - Agent-based flow with autonomous capabilitiesMULTIAGENT - Multi-agent coordination flowASSISTANT - Assistant-style flowwelcomeMessage - Initial greeting messagebackgroundColor - UI background colorallowedOrigins - Array of allowed CORS originsallowedOriginsError - Custom error message for unauthorized originspostProcessing - Post-processing settingscurl -X POST "https://your-flowise-instance.com/api/v1/chatflows" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My New Chatflow",
"flowData": "{\"nodes\":[{\"id\":\"node1\",\"type\":\"chatOpenAI\",\"data\":{}}],\"edges\":[]}",
"type": "CHATFLOW",
"deployed": false,
"isPublic": false,
"chatbotConfig": "{\"welcomeMessage\":\"Hello! How can I assist you?\"}"
}'
const response = await fetch('https://your-flowise-instance.com/api/v1/chatflows', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My New Chatflow',
flowData: JSON.stringify({
nodes: [{
id: 'node1',
type: 'chatOpenAI',
data: {}
}],
edges: []
}),
type: 'CHATFLOW',
deployed: false,
isPublic: false,
chatbotConfig: JSON.stringify({
welcomeMessage: 'Hello! How can I assist you?'
})
})
});
const newChatflow = await response.json();
import requests
import json
response = requests.post(
'https://your-flowise-instance.com/api/v1/chatflows',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'name': 'My New Chatflow',
'flowData': json.dumps({
'nodes': [{'id': 'node1', 'type': 'chatOpenAI', 'data': {}}],
'edges': []
}),
'type': 'CHATFLOW',
'deployed': False,
'isPublic': False,
'chatbotConfig': json.dumps({
'welcomeMessage': 'Hello! How can I assist you?'
})
}
)
new_chatflow = response.json()
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My New Chatflow",
"flowData": "{\"nodes\":[{\"id\":\"node1\",\"type\":\"chatOpenAI\",\"data\":{}}],\"edges\":[]}",
"deployed": false,
"isPublic": false,
"apikeyid": null,
"chatbotConfig": "{\"welcomeMessage\":\"Hello! How can I assist you?\"}",
"apiConfig": null,
"analytic": null,
"speechToText": null,
"textToSpeech": null,
"followUpPrompts": null,
"type": "CHATFLOW",
"category": null,
"workspaceId": "workspace-123",
"createdDate": "2024-01-20T15:30:00.000Z",
"updatedDate": "2024-01-20T15:30:00.000Z"
}
{
"message": "Usage limit exceeded for flows"
}
{
"message": "Invalid Chatflow Type"
}
flowData field should be a JSON string, not a raw JSON object. Make sure to stringify your flow configuration before sending it.