Skip to main content
POST
Create a workflow
You can create a workflow in two ways. Send one of them, not both.

From plain words

  • name: the workflow’s name.
  • task: what the workflow should do, in plain words. For example: "every Monday, list the top 10 Hacker News stories and save them to a CSV".
  • workspace_id: a workspace you belong to. Default: your personal workspace.
The workflow is made at once and answered with a 201. Valendata’s workflow builder then builds it from your skills. It makes a skill only when you have none for the job. This takes a few minutes. When the build is done, the workflow is tested once, and its schedule is saved. Read the workflow with Get a workflow until build.state is tested, needs_you, or failed:
  • build.said: the latest update in plain words. When tested, it says what the test read, when the workflow runs, and what the test cost.
  • build.test_run_id: the test run. Read it with GET /v1/runs/{run_id}.
  • build.brain_url: where you can watch the build, and answer a question, in the app.
The build is charged like any use of the builder, and the test run like any run.

From a graph

  • inputs: what a run takes, [{name, type, required, default, description, example}].
  • steps: in the same JSON the app saves, [{id, name, type, config, on_error, retries}]. A skill step names the skill in config.skill; a workflow step in config.target_workflow_id. Steps read inputs as {{inputs.<name>}}.
  • connections: [{from_step, to_step}]. Leave empty to run the steps in order.
  • workspace_id: a workspace you belong to. Default: your personal workspace.
Everything is checked first. A 422 lists every problem and nothing is saved. It does not run the workflow. The easiest way to build steps is the Brain on the canvas. See Build a workflow. To copy an existing workflow’s steps, read it with Get a workflow and include_graph=true.

Either way

A workflow whose skill step uses a skill that is not finished yet cannot run. Get a workflow lists why in cannot_run, and a run is refused with the reason. Nothing is charged. A key limited to some workflows cannot create one. Needs workflows:write. MCP tool: create_workflow (send task for plain words).

Authorizations

Authorization
string
header
required

API key with the vd_sk_ prefix, as Authorization: Bearer vd_sk_.... Create keys in Settings → API Keys.

Headers

Idempotency-Key
string

Any unique string (such as your order id). Resending the same request with the same key within 24 hours returns the first answer (with Idempotent-Replayed: true) and does nothing twice; the same key with a different request is a 422 idempotency_key_reused.

Required string length: 1 - 255

Body

application/json
name
string
required
Required string length: 1 - 500
description
string | null
Maximum string length: 10000
inputs
Inputs · object[]

The inputs a run takes (the API trigger): [{name, type, required, default, description, example}]; type is string, number, integer, boolean, array or object.

steps
Steps · object[]

The steps, in the same JSON the app saves: [{id, name, type, config, on_error, retries}]. type is one of the executor's step types (skill, workflow, http, code, transform, agent,...). A skill step names the skill in config.skill; a workflow step in config.target_workflow_id. Steps read inputs as {{inputs.}}.

connections
Connections · object[]

Edges between steps: [{from_step, to_step}]. Leave empty for a straight line (steps run in order).

task
string | null

Instead of steps: what the workflow should do, in plain words. The workflow is made at once and Valendata's workflow builder builds it from your skills (a few minutes); read build.state with GET /v1/workflows/{slug} until it is tested. Send task or steps, not both.

Required string length: 1 - 10000
workspace_id
string | null

A workspace you belong to; default your personal workspace.

Response

The new workflow.

A workflow as an API: what it takes and returns, its track record and endpoints.

id
string
required
slug
string
required
name
string
required
api_endpoint
string
required
runs_endpoint
string
required
run_status_endpoint
string
required
mcp_tool
string
required
description
string | null
status
string | null
input_schema
Input Schema · object[]
input_json_schema
Input Json Schema · object
output
string
default:""
output_json_schema
Output Json Schema · object
run_json_schema
Run Json Schema · object
trigger
Trigger · object
reliability
Reliability · object
steps
Steps · object[] | null

The graph's steps (on create, change and GET with include_graph=true).

connections
Connections · object[] | null
version
integer | null

How many saved versions came before this one.

build
BuildState · object | null

A workflow made from plain words: how its build is going

cannot_run
string[]

Why a run would be refused now (a skill step whose skill is not finished); empty when it can run

yours
boolean
default:true

Yours or your workspace's; false for a public marketplace workflow

public_view
Public View · object | null

Plain step summaries, trigger, sample rows and what it needs (public workflows)

price
SkillPrice · object | null

What a run usually costs, before it runs

clone_url
string | null

Clone a public workflow here first, then run your copy

listing
ListingCard · object | null

A marketplace listing's promise, the apps it delivers to, cost per run, risk and default schedule (public workflows whose publisher wrote one): clone it with inputs, schedule and destinations to set it up