---
title: "AddWorkflowNodeBody"
description: "Request body for a WorkflowNode operation."
section: "Reference"
group: "Types"
order: 274
---

## Definition

```ts
interface AddWorkflowNodeBody {
  workflowId: string;
  type: "function" | "workflow" | "agent" | "swarm";
  name: string;
  config?: Record<string, unknown> | undefined;
}
```

## Fields

| Field        | Type                                             | Notes                                                            |
| ------------ | ------------------------------------------------ | ---------------------------------------------------------------- |
| `workflowId` | `string`                                         | `required` — Workflow to add the node to.                        |
| `type`       | `"function" \| "workflow" \| "agent" \| "swarm"` | `required` — Node type                                           |
| `name`       | `string`                                         | `required` — Node display name                                   |
| `config`     | `Record<string, unknown> \| undefined`           | `optional` — Type-specific config (e.g. { agentId: 'agt\_...' }) |
