1. OpenAPI (Demo)
  2. Workflows
  3. Create a workflow
ReadmeGitHub
  • Platform API overview
  • Quickstart
  • POSTCreate a member session
  • POSTRefresh a member session
  • DELETERevoke a member session
  • GETList organizations
  • POSTCreate an organization
  • GETGet an organization
  • PATCHUpdate an organization
  • GETList organization members
  • POSTInvite an organization member
  • DELETERemove an organization member
  • PATCHUpdate a member role
  • GETList projects
  • POSTCreate a project
  • GETGet a project
  • DELETEArchive a project
  • PATCHUpdate a project
  • GETList project environments
  • POSTCreate a project environment
  • GETList project documents
  • POSTCreate a project document
  • GETGet a document
  • DELETEArchive a document
  • PATCHUpdate a document
  • POSTPublish a document
  • GETList contacts
  • POSTCreate a contact
  • GETGet a contact
  • DELETEDelete a contact
  • PATCHUpdate a contact
  • GETList product events
  • GETGet analytics overview
  • GETList workflows
  • POSTCreate a workflow
  • GETList workflow runs
  • GETList webhook subscriptions
  • POSTCreate a webhook subscription
  • GETGet a webhook subscription
  • DELETEDelete a webhook subscription
  • PATCHUpdate a webhook subscription
  • GETList webhook deliveries
  • POSTReplay a webhook delivery
  • GETList files
  • POSTCreate a multipart file upload
  • GETGet file metadata
  • DELETEDelete a file
  • GETGet current subscription
  • PATCHUpdate subscription settings
  • GETList invoices
  • GETGet metered usage
  • GETList API keys
  • POSTCreate an API key
  • POSTRevoke an API key
  • GETList audit logs
  • GETList exports
  • POSTCreate an export
  • GETGet API health
POST/organizations/{organizationId}/workflows

Create a workflow

Creates a draft workflow with typed trigger, condition, and action steps.

Send request

Use the documented inputs to call this endpoint directly.

API serverbase URL
Bearer tokenBearerAuthoptional
Stored only in this browser for the BearerAuth security scheme and reused on every API page in this group.

Parameters

Values are applied to the request and the example on the right.

organizationIdpath · stringrequired

Opaque organization identifier.

Idempotency-Keyheader · string · uuidoptional

Unique key for retry-safe writes, retained for 24 hours.

Request body

application/jsonrequired
namestringrequired
triggerobjectrequired
stepsarray<object>required
stateenumoptional

Values: "draft" · "active"

Responses

201application/json

Workflow created.

{
  "id": "wfl_01J8FC8R3N4V6Q9P2K7",
  "name": "Alert enterprise CSM about failed exports",
  "state": "active",
  "trigger": {
    "event": "export.failed"
  },
  "steps_count": 2,
  "run_health": {
    "last_24h": 42,
    "failed": 0
  },
  "created_at": "2026-08-12T13:20:00Z",
  "updated_at": "2026-09-01T08:00:00Z"
}
idstringoptional
namestringoptional
statestringoptional
triggerobjectoptional
steps_countintegeroptional
run_healthobjectoptional
created_atstring · date-timeoptional
updated_atstring · date-timeoptional
422

Workflow graph is invalid.

List workflows< PreviousList workflow runsNext >

Powered by heyo

curl --request POST \  'https://api.demo.heyo.example/v3/organizations/org_01J8F1Q6N6VTX4E8W9R2D0A7B3/workflows' \  --header 'Idempotency-Key: 5ba89923-8c6d-44a3-9ab7-2fbbdb865f9a' \  --header 'Content-Type: application/json' \  --data '{  "name": "Alert enterprise CSM about failed exports",  "trigger": {    "event": "export.failed"  },  "steps": [    {      "id": "filter_enterprise",      "type": "condition",      "expression": "event.organization.plan == '\"'\"enterprise'\"'\""    },    {      "id": "notify_slack",      "type": "notification",      "channel": "slack",      "template": "Export {{ event.id }} failed"    }  ],  "state": "draft"}'
{  "id": "wfl_01J8FC8R3N4V6Q9P2K7",  "name": "Alert enterprise CSM about failed exports",  "state": "active",  "trigger": {    "event": "export.failed"  },  "steps_count": 2,  "run_health": {    "last_24h": 42,    "failed": 0  },  "created_at": "2026-08-12T13:20:00Z",  "updated_at": "2026-09-01T08:00:00Z"}