Skip to main content
POST
/
v1
/
workflows
Create a Workflow
curl --request POST \
  --url https://flowker.sandbox.lerian.net/v1/workflows \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "Payment Notification Flow",
  "description": "Receives a webhook trigger and logs the payment event.",
  "nodes": [
    {
      "id": "trigger-1",
      "type": "trigger",
      "name": "Webhook Trigger",
      "position": {
        "x": 0,
        "y": 0
      },
      "data": {
        "triggerId": "webhook"
      }
    },
    {
      "id": "log-event",
      "type": "action",
      "name": "Log Payment Event",
      "position": {
        "x": 200,
        "y": 0
      },
      "data": {
        "action": "log"
      }
    }
  ],
  "edges": [
    {
      "id": "e1",
      "source": "trigger-1",
      "target": "log-event"
    }
  ],
  "metadata": {
    "team": "payments",
    "environment": "sandbox"
  }
}
'
{
  "createdAt": "2026-03-17T14:30:00Z",
  "status": "draft",
  "version": "1.0.0",
  "workflowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Authorizations

X-API-Key
string
header
required

API key for authenticating requests to the Flowker API. Provisioned via the API_KEY environment variable during deployment.

Body

application/json

Request body containing the workflow definition.

name
string
required

Unique name for the workflow.

Required string length: 1 - 100
Example:

"Payment Notification Flow"

description
string

Optional human-readable description of the workflow's purpose.

Maximum string length: 500
Example:

"Receives a webhook trigger and logs the payment event."

edges
object[]

Connections between nodes that define the execution flow. Each edge links a source node to a target node, optionally with a condition.

Maximum array length: 200
metadata
object

Custom key-value pairs for tagging or categorizing the workflow.

Example:
{
"team": "payments",
"environment": "sandbox"
}
nodes
object[]

The steps that make up this workflow. Each node is a unit of work — a trigger, an executor call, a conditional branch, or an action.

Maximum array length: 100

Response

Indicates that the resource was successfully created and the operation was completed as expected.

createdAt
string<date-time>

Timestamp when the workflow was created.

Example:

"2026-03-17T14:30:00Z"

status
string

Initial status of the workflow (always draft on creation).

Example:

"draft"

version
string

Version of the workflow definition.

Example:

"1.0.0"

workflowId
string<uuid>

Unique identifier of the created workflow.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"