Skip to main content
POST
/
api
/
v1
/
flows
Create a new flow
curl --request POST \
  --url https://api.dualship.run/api/v1/flows \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Workspace-Id: <x-workspace-id>' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "trigger": {
    "type": "<string>",
    "config": [
      123
    ]
  },
  "description": "<string>",
  "edges": [
    123
  ],
  "metadata": [
    123
  ],
  "nodes": [
    123
  ]
}
'
{
  "created_at": "2024-01-15T10:30:00Z",
  "description": "Handles user registration and welcome email",
  "edges": [
    123
  ],
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "metadata": [
    123
  ],
  "name": "User Registration Flow",
  "nodes": [
    123
  ],
  "project_id": "550e8400-e29b-41d4-a716-446655440001",
  "slug": "user-registration",
  "status": "active",
  "trigger_config": [
    123
  ],
  "trigger_type_id": "550e8400-e29b-41d4-a716-446655440002",
  "updated_at": "2024-01-15T10:30:00Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication

Headers

X-Workspace-Id
string
required

Workspace ID

Query Parameters

project_id
string

Project ID (uses default if not specified)

Body

application/json

Flow configuration

name
string
required
slug
string
required
trigger
object
required
description
string
edges
integer[]
metadata
integer[]
nodes
integer[]

Response

Flow created successfully

created_at
string
Example:

"2024-01-15T10:30:00Z"

description
string
Example:

"Handles user registration and welcome email"

edges
integer[]
id
string
Example:

"550e8400-e29b-41d4-a716-446655440000"

metadata
integer[]
name
string
Example:

"User Registration Flow"

nodes
integer[]
project_id
string
Example:

"550e8400-e29b-41d4-a716-446655440001"

slug
string
Example:

"user-registration"

status
string
Example:

"active"

trigger_config
integer[]
trigger_type_id
string
Example:

"550e8400-e29b-41d4-a716-446655440002"

updated_at
string
Example:

"2024-01-15T10:30:00Z"