Skip to main content
POST
/
api
/
v1
/
chatflows
Create Agentflow
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,
  "category": "<string>",
  "chatbotConfig": "<string>",
  "apiConfig": "<string>"
}
'
{
  "400": {},
  "401": {},
  "403": {},
  "500": {},
  "id": "<string>",
  "name": "<string>",
  "flowData": "<string>",
  "deployed": true,
  "type": "<string>",
  "createdDate": {},
  "workspaceId": "<string>"
}
Creates a new agentflow in your workspace. Agentflows are AI agent workflows that can be configured with various nodes and capabilities.

Request Body

name
string
required
Name of the agentflow
flowData
string
required
JSON string containing the flow configuration with nodes and edges
type
string
required
Flow type. Use AGENTFLOW for agent workflows. Options: CHATFLOW, AGENTFLOW, MULTIAGENT, ASSISTANT
deployed
boolean
Whether to deploy the agentflow immediately. Defaults to false
isPublic
boolean
Whether the agentflow should be publicly accessible. Defaults to false
category
string
Category classification for the agentflow
chatbotConfig
string
JSON string containing chatbot configuration options
apiConfig
string
JSON string containing API configuration settings

Response

id
string
Unique identifier for the created agentflow
name
string
Name of the agentflow
flowData
string
JSON string containing the flow configuration
deployed
boolean
Deployment status of the agentflow
type
string
Flow type
createdDate
timestamp
Timestamp when the agentflow was created
workspaceId
string
ID of the workspace containing this agentflow

Example Request

curl -X POST \
  'https://your-flowise-instance.com/api/v1/chatflows' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Support Agent",
    "type": "AGENTFLOW",
    "flowData": "{\"nodes\":[{\"id\":\"1\",\"type\":\"agent\"}],\"edges\":[]}",
    "deployed": true,
    "category": "Customer Service"
  }'

Example Response

{
  "id": "abc123-def456-ghi789",
  "name": "Support Agent",
  "flowData": "{\"nodes\":[{\"id\":\"1\",\"type\":\"agent\"}],\"edges\":[]}",
  "deployed": true,
  "isPublic": false,
  "type": "AGENTFLOW",
  "category": "Customer Service",
  "createdDate": "2024-01-20T15:30:00Z",
  "updatedDate": "2024-01-20T15:30:00Z",
  "workspaceId": "workspace-123"
}

Error Responses

400
error
Bad Request - Missing required fields or invalid data format
401
error
Unauthorized - Invalid or missing API key
403
error
Forbidden - Insufficient permissions to create agentflows
500
error
Internal Server Error - Server encountered an error processing the request

Build docs developers (and LLMs) love