Skip to main content
POST
/
workflows
/
validate
Validate a workflow definition
curl --request POST \
  --url https://v1.api.altostrat.io/workflows/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Daily Network Health Check",
  "authorization_id": "auth_01H...",
  "nodes": [
    {
      "id": "n1",
      "type": "manual_trigger",
      "position": {
        "x": 150,
        "y": 250
      },
      "data": {
        "componentId": "manual_trigger"
      }
    }
  ],
  "edges": [
    {
      "id": "e1-2",
      "source": "n1",
      "target": "n2",
      "sourceHandle": "true"
    }
  ],
  "description": "<string>",
  "is_active": true,
  "schedule_type": "manual",
  "schedule_value": "0 4 * * *"
}
'
{
  "valid": true,
  "errors": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Standard JWT for user sessions obtained via Altostrat authentication.

Body

application/json
name
string
required

The name for the new workflow.

Example:

"Daily Network Health Check"

authorization_id
string
required

The prefixed ID of the Authorization (auth_...) to use for this workflow's executions.

Example:

"auth_01H..."

nodes
object[]
required

The array of nodes defining the workflow logic.

Minimum array length: 1
edges
object[]
required

The array of edges connecting the workflow nodes.

description
string | null

An optional description for the workflow.

is_active
boolean
default:true

Set to false to create the workflow in an inactive state.

schedule_type
enum<string>
default:manual
Available options:
manual,
interval,
cron,
daily,
weekly,
monthly
schedule_value
string | null

Required if schedule_type is interval or cron.

Example:

"0 4 * * *"

Response

The workflow definition is valid.

valid
boolean
Example:

true

errors
string[]