---
title: "CreateRunBody"
description: "Request body for `POST /api/runs` — the single endpoint to execute any entity.

`id` is a prefixed entity ID (agt_, fun_, swm_, wfl_) — the handler detects
the entity type from the prefix. `input` defaults to `{ text: string }` but
accepts any JSON object when the entity defines a custom input schema."
section: "Reference"
group: "Types"
order: 177
---

## Definition

```ts
interface CreateRunBody {
  id: string;
  input: Record<string, unknown>;
  mode?: "sync" | "async" | undefined;
}
```

## Fields

| Field   | Type                             | Notes                                                                                                  |
| ------- | -------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `id`    | `string`                         | `readonly` `required` — Prefixed ID of the entity to run. Entity type is derived from the prefix.      |
| `input` | `Record<string, unknown>`        | `required` — Input payload; defaults to `{ text: string }` when the entity has no custom input schema. |
| `mode`  | `"sync" \| "async" \| undefined` | `optional` — Execution mode; defaults to the entity's configured mode.                                 |
