For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI ReferenceChangelogModel Versioning
GuidesAPI ReferenceChangelogModel Versioning
    • Getting Started
    • Authentication
    • API Versioning
    • SDKs
    • Deployments
    • Error Codes
    • Async Processing
  • Endpoints
      • POSTRun Workflow
      • POSTBatch Run Workflow
      • GETGet Workflow Run
      • POSTUpdate Workflow Run
      • POSTCancel Workflow Run
      • DELDelete Workflow Run
      • GETList Workflow Runs
      • POSTCreate Workflow
      • GETGet Workflow
      • POSTUpdate Workflow
      • GETList Workflows
      • POSTCreate Workflow Version
      • GETGet Workflow Version
      • GETList Workflow Versions
  • Webhook Events
LogoLogo
EndpointsWorkflows

Create Workflow

POST
/workflows
POST
/workflows
1import { ExtendClient } from "extend-ai";
2
3const client = new ExtendClient({ token: "YOUR_TOKEN" });
4await client.workflows.create({
5 name: "Invoice Processing",
6 steps: [{
7 type: "TRIGGER",
8 name: "name"
9 }, {
10 type: "PARSE",
11 name: "name"
12 }, {
13 type: "EXTRACT",
14 name: "name"
15 }, {
16 type: "HUMAN_REVIEW",
17 name: "name"
18 }]
19});
1{
2 "object": "workflow",
3 "id": "workflow_BMlfq_yWM3sT-ZzvCnA3f",
4 "name": "Invoice Processing",
5 "createdAt": "2024-03-21T16:45:00Z",
6 "updatedAt": "2024-03-21T16:45:00Z",
7 "draftVersion": {
8 "object": "workflow_version",
9 "id": "workflow_version_Zk9mNP12Qw4-yTv8BdR3H",
10 "version": "1",
11 "name": "Production v1",
12 "steps": [
13 {
14 "name": "string",
15 "type": "TRIGGER",
16 "next": [
17 {
18 "step": "parse"
19 }
20 ]
21 }
22 ],
23 "createdAt": "2024-03-21T16:45:00Z"
24 }
25}
Create a new workflow. Optionally provide `steps` to define the workflow's step graph. When `steps` is omitted, the workflow is created with default steps (`TRIGGER` → `PARSE`). When `steps` is provided, the step graph is validated and the draft version is populated with the given steps. **Note:** The default steps may change in the future. If your integration depends on a specific step graph, provide `steps` explicitly.
Was this page helpful?
Previous

Get Workflow

Next
Built with

Create a new workflow. Optionally provide steps to define the workflow’s step graph.

When steps is omitted, the workflow is created with default steps (TRIGGER → PARSE). When steps is provided, the step graph is validated and the draft version is populated with the given steps.

Note: The default steps may change in the future. If your integration depends on a specific step graph, provide steps explicitly.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-extend-api-version"2026-02-09"Optional
API version to use for the request. If you're using an SDK, you can ignore this parameter. If you are not using an SDK and 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/2026-02-09/developers/api-versioning) for more details.

Request

This endpoint expects an object.
namestringRequired
The name of the workflow.
stepslist of objectsOptional
The steps that define the workflow's processing graph. Each step has a `type`, a unique `name`, and optional `next` entries that define routing to downstream steps. When omitted, the workflow is created with default steps (`TRIGGER` → `PARSE`). The default steps may change in the future. See the [Configuring Workflows via API guide](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api) for step definitions, branching patterns, and examples.

Response

Workflow created successfully
objectenum

The type of object. Always "workflow".

Allowed values:
idstring
The ID of the workflow.
namestring
The name of the workflow.
createdAtstringformat: "date-time"

The time (in UTC) at which the object was created. Will follow the RFC 3339 format.

Example: "2024-03-21T16:45:00Z"

updatedAtstringformat: "date-time"

The time (in UTC) at which the object was last updated. Will follow the RFC 3339 format.

Example: "2024-03-21T16:45:00Z"

draftVersionobject
A workflow version with its step definitions.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error

API version to use for the request. If you’re using an SDK, you can ignore this parameter. If you are not using an SDK and do not specify a version, you will either receive a 400 Bad Request or be set to a previous legacy version. See API Versioning for more details.

The steps that define the workflow’s processing graph. Each step has a type, a unique name, and optional next entries that define routing to downstream steps.

When omitted, the workflow is created with default steps (TRIGGER → PARSE). The default steps may change in the future.

See the Configuring Workflows via API guide for step definitions, branching patterns, and examples.