Skip to main content
POST
/
workflows
Create Workflow
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>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "nodes": [
    {}
  ],
  "edges": [
    {}
  ],
  "status": "<string>",
  "version": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "global_nodes": [
    "<string>"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.mrassistant.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Workflow creation model.

name
string
required
Required string length: 1 - 255
nodes
WorkflowNode · object[]
required
edges
WorkflowEdge · object[]
required
description
string | null
global_nodes
string[] | null
globalPrompt
string | null

Response

Successful Response

Workflow response model.

id
string<uuid>
required
tenant_id
string<uuid>
required
name
string
required
nodes
Nodes · object[]
required
edges
Edges · object[]
required
status
string
required
version
integer
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
description
string | null
global_nodes
string[] | null