Skip to main content
POST
/
v1
/
workflows
Create Workflow
curl --request POST \
  --url https://api.example.com/v1/workflows \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "code": "<string>",
  "workflow_type": "<string>",
  "indicator_types": [],
  "state": "draft",
  "timeout_seconds": 300,
  "retry_count": 0,
  "is_active": true,
  "tags": [],
  "time_saved_minutes": 123,
  "approval_mode": "always",
  "approval_channel": "<string>",
  "approval_timeout_seconds": 3600,
  "risk_level": "medium",
  "documentation": "<string>"
}
'
{
  "data": {
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "workflow_type": "<string>",
    "indicator_types": [
      "<string>"
    ],
    "state": "<string>",
    "code_version": 123,
    "is_active": true,
    "is_system": true,
    "tags": [
      "<string>"
    ],
    "time_saved_minutes": 123,
    "approval_mode": "<string>",
    "risk_level": "<string>",
    "documentation": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "code": "<string>",
    "timeout_seconds": 123,
    "retry_count": 123,
    "approval_channel": "<string>",
    "approval_timeout_seconds": 123
  },
  "meta": {}
}

Body

application/json

Request body for POST /v1/workflows.

name
string
required
code
string
required
workflow_type
string | null
indicator_types
string[]
state
string
default:draft
timeout_seconds
integer
default:300
retry_count
integer
default:0
is_active
boolean
default:true
tags
string[]
time_saved_minutes
integer | null
approval_mode
string
default:always
approval_channel
string | null
approval_timeout_seconds
integer
default:3600
risk_level
string
default:medium
documentation
string | null

Response

Successful Response

data
WorkflowResponse · object
required

Full response — includes code and approval config.

meta
Meta · object