Skip to main content
POST
/
api
/
v1
/
chatflows
Create Chatflow
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>"
}

Authentication

This endpoint requires authentication. You must include your API key in the request headers or be authenticated via session.
Required permissions: chatflows:create, chatflows:update, agentflows:create, or agentflows:update

Request Body

name
string
required
Name of the chatflow
flowData
string
required
JSON string containing the flow configuration, nodes, and edges that define the chatflow logic
type
string
default:"CHATFLOW"
Type of the chatflow. Valid values:
  • CHATFLOW - Standard conversational flow
  • AGENTFLOW - Agent-based flow with autonomous capabilities
  • MULTIAGENT - Multi-agent coordination flow
  • ASSISTANT - Assistant-style flow
deployed
boolean
default:"false"
Whether the chatflow should be immediately deployed
isPublic
boolean
default:"false"
Whether the chatflow should be publicly accessible
apikeyid
string
API key ID to associate with this chatflow for access control
chatbotConfig
string
JSON string containing chatbot configuration:
  • welcomeMessage - Initial greeting message
  • backgroundColor - UI background color
  • allowedOrigins - Array of allowed CORS origins
  • allowedOriginsError - Custom error message for unauthorized origins
  • postProcessing - Post-processing settings
apiConfig
string
JSON string containing API-specific configuration
analytic
string
JSON string containing analytics configuration
speechToText
string
JSON string containing speech-to-text configuration
textToSpeech
string
JSON string containing text-to-speech configuration
followUpPrompts
string
JSON string containing follow-up prompt suggestions
category
string
Category for organizing and filtering chatflows

Response

Returns the created chatflow object with all fields including the generated ID and timestamps.
id
string
Unique identifier (UUID) for the newly created chatflow
name
string
Name of the chatflow
flowData
string
JSON string containing the flow configuration
deployed
boolean
Deployment status of the chatflow
isPublic
boolean
Public access status
type
string
Type of the chatflow
workspaceId
string
ID of the workspace owning this chatflow
createdDate
string
ISO 8601 timestamp of creation
updatedDate
string
ISO 8601 timestamp of last update

Example Request

cURL
curl -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?\"}"
  }'
JavaScript
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();
Python
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()

Example Response

{
  "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"
}

Error Responses

401
error
Unauthorized - Invalid or missing API key
403
error
Forbidden - Insufficient permissions or usage limit exceeded
{
  "message": "Usage limit exceeded for flows"
}
400
error
Bad Request - Invalid chatflow type or malformed request body
{
  "message": "Invalid Chatflow Type"
}
404
error
Not Found - Organization or workspace not found
412
error
Precondition Failed - Request body not provided
500
error
Internal Server Error - An error occurred while creating the chatflow
The chatflow will be created in your active workspace. Make sure you have sufficient quota available for creating new flows.
The flowData field should be a JSON string, not a raw JSON object. Make sure to stringify your flow configuration before sending it.

Build docs developers (and LLMs) love