---
title: "Workflow Nodes"
description: "REST endpoints for workflow nodes. Bearer-auth required."
section: "API"
group: "REST"
order: 83
---

## GET /api/workflow-nodes

List workflow nodes.

**Query parameters**

- `limit` (optional): Page size (1–100, default 100).
- `after` (optional): Keyset cursor — return the page after this row (next page).
- `before` (optional): Keyset cursor — return the page before this row (prev page).
- `ids` (optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).
- `filter` (optional): Nested filter expression (`<Entity>Filter`): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.
- `orderBy` (optional): Multi-key sort (`<Entity>OrderBy[]`): array of `{ field: direction }` applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.
- `workflow_id` (required): Workflow whose nodes to list.
- `type` (optional): Shorthand: filter where `type` equals this value.

**Response**

```json
{
  "data": [
    {
      "id": "<...>",
      "workflowId": "<...>",
      "type": "<...>",
      "name": "<...>",
      "config?": "<...>",
      "createdAt": "<...>"
    }
  ],
  "pageInfo": {
    "total": "number",
    "hasNextPage": "boolean",
    "hasPreviousPage": "boolean",
    "startCursor": "string",
    "endCursor": "string"
  }
}
```

## POST /api/workflow-nodes

Add a workflow node

**Request body**

```json
{
  "workflowId": "string",
  "type": "agent | swarm | function | workflow",
  "name": "string",
  "config?": {}
}
```

**Response**

```json
{
  "id": "string",
  "workflowId": "string",
  "type": "agent | function | swarm | workflow",
  "name": "string",
  "config?": "any",
  "createdAt": "string"
}
```

## GET /api/workflow-nodes/{id}

Get a workflow node by ID.

**Path parameters**

- `id` (required): Node to retrieve.

**Response**

```json
{
  "id": "string",
  "workflowId": "string",
  "type": "agent | function | swarm | workflow",
  "name": "string",
  "config?": "any",
  "createdAt": "string"
}
```

## PATCH /api/workflow-nodes/{id}

Update a workflow node

**Path parameters**

- `id` (required): The workflow node's prefixed ID.

**Request body**

```json
{
  "name?": "string",
  "type?": "agent | swarm | function | workflow",
  "config?": {}
}
```

**Response**

```json
{
  "id": "string",
  "workflowId": "string",
  "type": "agent | function | swarm | workflow",
  "name": "string",
  "config?": "any",
  "createdAt": "string"
}
```

## DELETE /api/workflow-nodes/{id}

Delete a workflow node.

**Path parameters**

- `id` (required): Node to delete.

**Response**

```json
{
  "success": "boolean"
}
```
