201 Created with the new workflow.
Need a starting point? Call Get Example Workflows for validated templates you can copy directly, and List Workflow Actions to discover every action kind and its required inputs.
Overview
The Create Workflow endpoint accepts a workflow definition and stores it under your organisation. New workflows default toDRAFT status and are disabled; publish and enable them when ready to run.
Authentication
Requires a valid API key. No special permission scope is needed beyond a valid key.Key Features
- JSON-Defined Pipelines: Build workflows programmatically from action kinds
- Draft or Published: Start in
DRAFTand promote toPUBLISHEDwhen ready - Optional Search Binding: Link the workflow to a saved social listening search
- No Credit Cost: Creating a workflow is free
Workflow Definition Shape
Theworkflow field is a JSON object with this structure:
| Key | Type | Required | Description |
|---|---|---|---|
trigger | object | No | Triggering event. { "kind": "workflows/new-post" | "workflows/engagement" | "workflows/webhook" | "workflows/scheduled-trigger", "inputs": { } } |
actions | array | Yes | Ordered list of action steps. Each item is { "id": string, "kind": string, "name"?: string, "inputs"?: object } |
edges | array | Yes | Graph edges connecting actions. Each item is { "from": string, "to": string, "name"?: string, "conditional"?: { "type": "if" | "else" | "match" | "loop" | "completed", "ref": string } }. Use "$source" as from to connect from the trigger |
nodes | array | No | Optional canvas annotations (notes/film) — not required for programmatic creation |
{{ !ref($.<id>.result.output) }} or the trigger payload via {{ !ref($.trigger.outputs.<field>) }}.
Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | - | Workflow name (1-255 characters) |
description | string | No | "" | Free-form workflow description |
workflow | object | Yes | - | Workflow definition. See Workflow Definition Shape |
search_id | string | No | - | Saved social listening search ID to link this workflow to. Surfaces on the response as social_saved_search_id |
enabled | boolean | No | false | Whether the workflow is active and ready to execute |
status | string | No | "DRAFT" | Workflow status. One of DRAFT or PUBLISHED |
Example Response
Returned with HTTP status201 Created.
Response Fields
| Field | Type | Description |
|---|---|---|
message | string | Human-readable status message |
success | boolean | true on success |
data | object | The created workflow (see below) |
data object contains:
| Field | Type | Description |
|---|---|---|
id | string | Unique workflow identifier |
name | string | Workflow name |
description | string | Workflow description |
workflow | object | Workflow definition (JSON). See Workflow Definition Shape |
enabled | boolean | Whether the workflow is active |
status | string | Workflow status (DRAFT or PUBLISHED) |
social_saved_search_id | string | null | Linked saved search ID, if any (set via search_id on the request) |
created | string | ISO 8601 creation timestamp |
updated | string | ISO 8601 last update timestamp |
Credit Usage
This endpoint is free and does not consume credits.Related Endpoints
- Get Example Workflows for ready-to-use workflow templates
- List Workflow Actions to discover available action kinds and their inputs
- Test Workflow to dry-run the workflow against sample data before enabling it
- Update Workflow to modify a workflow after creation
- List Workflows to browse existing workflows