Create a Flow

Create a new Agentic Flow.

Creates a new Flow inside the caller's group. name is required (max 255 characters). The graph itself (nodes and connections) is required: every create and update validates the full graph (2 to 20 nodes, 1 to 45 connections), and an invalid graph returns an InvalidArgumentError. A Flow only runs on its trigger while enabled is true.

A Flow is a directed acyclic graph of nodes; successor nodes can reference an upstream node's output with dynamic variables. The example below is a four-node threat-hunt triage pipeline: it runs a saved search on a schedule, feeds the matched IOCs into a prompt for triage, and emails the agent's summary — using CEL expressions to pass data between nodes.

{
  "data": {
    "type": "flow",
    "attributes": {
      "name": "Cobalt Strike daily triage",
      "enabled": true,
      "nodes": [
        {
          "id": "n1",
          "type": "NODE_TYPE_SCHEDULE_TIME",
          "name": "Every morning",
          "schedule_node": {
            "cron_expression": "0 8 * * *",
            "timezone": "UTC"
          }
        },
        {
          "id": "n2",
          "type": "NODE_TYPE_RUN_SAVED_SEARCH",
          "name": "Find Cobalt Strike infrastructure",
          "run_saved_search_node": {
            "saved_search_id": "ss-cobalt-strike"
          }
        },
        {
          "id": "n3",
          "type": "NODE_TYPE_RUN_PROMPT",
          "name": "Triage matched IOCs",
          "run_prompt_node": {
            "prompt": "Triage the following indicators and summarise the most relevant threats for a SOC analyst: ${nodes.n2.output.matched_items.slice(0, 20).join(\", \")}"
          }
        },
        {
          "id": "n4",
          "type": "NODE_TYPE_SEND_EMAIL",
          "name": "Email the SOC",
          "send_email_node": {
            "notification_emails": [
              "[email protected]"
            ],
            "email_subject": "${nodes.n2.output.match_count > 0 ? \"[Alert] Cobalt Strike infrastructure detected\" : \"[Clean] No Cobalt Strike infrastructure\"}",
            "message": "${nodes.n3.output.gti_agentic_response}"
          }
        }
      ],
      "connections": [
        {
          "source_node_id": "n1",
          "target_node_id": "n2",
          "source_handle": ""
        },
        {
          "source_node_id": "n2",
          "target_node_id": "n3",
          "source_handle": ""
        },
        {
          "source_node_id": "n3",
          "target_node_id": "n4",
          "source_handle": ""
        }
      ]
    }
  }
}
Body Params
json
required

A Flow object (a directed acyclic graph of nodes). Required: type, attributes.name, attributes.connections, attributes.nodes . Node parameters may embed upstream outputs with CEL dynamic variables (${nodes.<id>.output.<field>}).

Headers
string
required

Your API key.

string

Optional. ID of the group whose API quota should be charged for the request. If omitted, the parent group's quota is used. Only relevant when your API key belongs to more than one group (multi-tenancy).

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json