> This page is for version v2025-04-21.
> For other versions, use one of these documentation indexes:
> - v2026-02-09 (default): https://docs.extend.ai/2026-02-09/llms.txt
> - v2025-04-21: https://docs.extend.ai/2025-04-21/llms.txt
> - v2024-12-23: https://docs.extend.ai/2024-12-23/llms.txt

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.ai/llms.txt
> Use this file to discover all available pages before exploring further.
>
> ## API version
> The current API version is `2026-02-09`, served at the site root (no version prefix in URLs).
> If this page URL contains `/2025-04-21/` or `/2024-12-23/`, you are reading an older API version.
> Prefer the current docs at https://docs.extend.ai/llms.txt unless the user explicitly needs that older version.
> Do not treat older-version pages as the source of truth for new integrations.

# Create Workflow

POST https://api.extend.ai/workflows
Content-Type: application/json

Create a new workflow in Extend. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome.

This endpoint will create a new workflow in Extend, which can then be configured and deployed. Typically, workflows are created from our UI, however this endpoint can be used to create workflows programmatically. Configuration of the flow still needs to be done in the dashboard.


Reference: https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/create-workflow

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Headers

- `x-extend-api-version` ("2025-04-21", optional, default: 2025-04-21) — API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — The name of the workflow

## Response

### 200

Successfully created workflow

- `success` (boolean, required)
- `workflow` (Workflow, required)

## Errors

### 400 Bad Request Error

Bad Request

- `success` (boolean, optional)
- `error` (string, optional) — Error message

### 401 Unauthorized Error

Unauthorized

- `success` (boolean, optional)
- `error` (string, optional) — Error message

## Types

### Workflow

- `object` (string, required) — The type of response. In this case, it will always be `"workflow"`.
- `id` (string, required) — The ID of the workflow. Example: `"workflow_BMlfq_yWM3sT-ZzvCnA3f"`
- `version` (string, required) — The version of the workflow. Examples: `"3"`, `"draft"`
- `name` (string, required) — The name of the workflow. Example: `"Invoice Processing"`

## Examples

**Request**

```json
{
  "name": "Invoice Processing"
}
```

**Response**

```json
{
  "success": true,
  "workflow": {
    "object": "workflow",
    "id": "workflow_BMlfq_yWM3sT-ZzvCnA3f",
    "version": "draft",
    "name": "Invoice Processing"
  }
}
```