Documentation · Graphs

Workflow graphs

Replace the full node/edge graph in one request — the same strategy as the editor save. See available types in Nodes.

Graph model

GET /api/v1/workflows/:id returns the full graph. PUT /api/v1/workflows/:id replaces the entire graph. Default handles are source-1 target-1. Condition false branch uses source-false. Reference upstream values with {{variableName}}. Built-in helpers such as {{now}} are documented under Templates.

Do not send credentialId — it is stripped on write. On read, credential ids and secrets are never returned; nodes may include data.credentialConfigured so agents know a dashboard credential is attached. Users attach credentials in the UI after the graph is written.

{
  "nodes": [
    {
      "id": "t1",
      "type": "MANUAL_TRIGGER",
      "position": { "x": 0, "y": 0 },
      "data": {}
    },
    {
      "id": "h1",
      "type": "HTTP_REQUEST",
      "position": { "x": 280, "y": 0 },
      "data": {
        "variableName": "users",
        "endpoint": "https://api.example.com/users",
        "method": "GET",
        "authType": "NONE"
      }
    }
  ],
  "edges": [
    {
      "id": "e1",
      "source": "t1",
      "target": "h1",
      "sourceHandle": "source-1",
      "targetHandle": "target-1"
    }
  ]
}
PUT/api/v1/workflows/:id

Replace workflow graph

Replaces the full node/edge graph (same strategy as the editor save). Omit credentialId — credentials are attached only in the dashboard.

Request body

  • nodesarray

    Full list of nodes: { id, type, position, data? }.

  • edgesarrayoptional

    Connections: { id?, source, target, sourceHandle?, targetHandle? }. Defaults: source-1 → target-1.

Example request

curl -X PUT "https://agenticsline.com/api/v1/workflows/clx..." \
  -H "Authorization: Bearer agt_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "nodes": [
      {
        "id": "t1",
        "type": "MANUAL_TRIGGER",
        "position": { "x": 0, "y": 0 },
        "data": {}
      },
      {
        "id": "h1",
        "type": "HTTP_REQUEST",
        "position": { "x": 280, "y": 0 },
        "data": {
          "variableName": "users",
          "endpoint": "https://api.example.com/users",
          "method": "GET",
          "authType": "NONE"
        }
      }
    ],
    "edges": [
      {
        "id": "e1",
        "source": "t1",
        "target": "h1",
        "sourceHandle": "source-1",
        "targetHandle": "target-1"
      }
    ]
  }'

Example response

{
  "id": "clx...",
  "name": "Lead enrichment",
  "published": false,
  "status": "draft",
  "createdAt": "2026-07-24T08:00:00.000Z",
  "updatedAt": "2026-07-24T10:00:00.000Z"
}
We use cookies
We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.

Learn more