> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sixtyfour.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Legacy Incoming Webhooks

> Start workflow runs by POSTing data from a CRM, a scheduler or your own tools.

This page documents the original `POST /workflows/run` route, which keeps working. For new integrations, see [Incoming Webhooks](https://docs.sixtyfour.ai/api-reference/webhooks/incoming.md).

> [!TIP]
>
> An incoming webhook is a workflow whose first block is the `webhook` source block. POST a payload to `/workflows/run`, and that payload becomes the workflow's input dataset.

## Headers

| Name | Type | Required | Description |
| - | - | - | - |
| x-api-key | string | Yes, unless you send `Authorization` | Your Sixtyfour API key |
| Authorization | string | No | `Bearer ACCESS_TOKEN` for an [OAuth client](https://docs.sixtyfour.ai/guides/oauth-clients.md) |
| Content-Type | string | Yes | `application/json` |

## Configure the webhook block

The `webhook` block is configured inside the workflow editor. It defines the shape of the data your workflow expects.

| Spec field | Type | Required | Description |
| - | - | - | - |
| `input_schema` | object | Recommended | Map of column names to field schemas. Declares the columns the workflow expects so they can be referenced by downstream blocks. |
| `webhook_input` | string (JSON) | No | Default sample payload used when the workflow runs without `webhook_payload`: test runs in the editor, scheduled runs, and API runs that send no payload. |
| `dataframe_type` | string | Yes | `LEAD` or `COMPANY`. Determines which downstream blocks can consume the output. |

Each row in your POSTed payload becomes one row in the workflow's input dataset. Columns not declared in `input_schema` still pass through to downstream blocks.

See the [Workflow Blocks reference](https://docs.sixtyfour.ai/api-reference/workflows/workflow-blocks.md) for where this fits in the block catalog.

## Trigger a workflow run

POST your payload to `/workflows/run` with the workflow ID as a query parameter.

```http theme={null}
POST https://api.sixtyfour.ai/workflows/run?workflow_id={workflow_id}
```

### Request Body

| Field | Type | Description |
| - | - | - |
| `webhook_payload` | array or object | Input data for the workflow. Can be a list of records (multi-row) or a single object (one row). |
| `specs_override` | object | Optional. Override specs of the source block. Open **View Workflow Definition** in the workflow editor's More options menu (⋮) to see the block's specs. |

> [!WARNING]
>
> Unknown body keys are ignored. If `webhook_payload` is missing or misspelled, for example `webhookPayload`, the run processes the block's saved `webhook_input` instead of your rows, and it is billed.

### Example Request

```bash cURL theme={null}
curl -X POST "https://api.sixtyfour.ai/workflows/run?workflow_id=WORKFLOW_ID" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_payload": [
      {
        "company_name": "Acme Corp",
        "website": "acme.com",
        "industry": "Technology"
      },
      {
        "company_name": "TechStart Inc",
        "website": "techstart.io",
        "industry": "Software"
      }
    ]
  }'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.sixtyfour.ai/workflows/run",
    headers={
        "x-api-key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    params={"workflow_id": "WORKFLOW_ID"},
    json={
        "webhook_payload": [
            {"company_name": "Acme Corp", "website": "acme.com"},
            {"company_name": "TechStart Inc", "website": "techstart.io"},
        ]
    },
)
job_id = response.json()["job_id"]
```

```javascript JavaScript theme={null}
const response = await fetch(
  "https://api.sixtyfour.ai/workflows/run?workflow_id=WORKFLOW_ID",
  {
    method: "POST",
    headers: {
      "x-api-key": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      webhook_payload: [
        { company_name: "Acme Corp", website: "acme.com" },
        { company_name: "TechStart Inc", website: "techstart.io" },
      ],
    }),
  }
);
const { job_id } = await response.json();
```

### Response (200)

```json theme={null}
{
  "status": "RUNNING",
  "workflow_id": "3f8b2c1e-6d4a-4f9b-8e2c-1a5b7c9d0e3f",
  "job_id": "0b9d7c1e-2f4a-4e8b-9c3d-5a6f7e8d9c0b"
}
```

Use the returned `job_id` to track execution. See [Workflow Execution](https://docs.sixtyfour.ai/api-reference/workflows/workflows-execution.md) for status, results, and cancellation endpoints.

## Rules and constraints

* Top-level keys that start with `_` are reserved; a row with one is rejected.
* `read_csv` source blocks are triggered with `specs_override.resource_handle_id` (from `/storage/csv/upload`), not `webhook_payload`. See [Workflow Execution](https://docs.sixtyfour.ai/api-reference/workflows/workflows-execution.md).
* Payloads missing required columns from `input_schema`, or malformed JSON, are rejected with a validation error.
* Workflows must have exactly one source block.

## Receiving results

Incoming webhooks only handle the trigger. To receive workflow output back at your URL, add an `outgoing_webhook` block to the workflow. See [Outgoing Webhooks](https://docs.sixtyfour.ai/api-reference/webhooks/outgoing.md).

Or poll for completion and download results with the [Workflow Execution](https://docs.sixtyfour.ai/api-reference/workflows/workflows-execution.md) endpoints.

## Related

* [Batch Processing](https://docs.sixtyfour.ai/guides/batch-processing.md)
* [Async Jobs](https://docs.sixtyfour.ai/api-reference/async-jobs.md)
* [Handling Errors](https://docs.sixtyfour.ai/api-reference/legacy/errors.md)
* [Credit Costs](https://docs.sixtyfour.ai/guides/credits-and-pricing.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.