Skip to main content
POST
/
workflows
/
validate
Validate workflow script
curl --request POST \
  --url https://api.trymaitai.ai/api/v1/workflows/validate \
  --header 'Content-Type: application/json' \
  --header 'X-Maitai-Api-Key: <api-key>' \
  --data @- <<EOF
{
  "code": "def execute(ctx):\n    return {'ok': True}",
  "kind": "execute"
}
EOF
{
  "data": {
    "ok": true,
    "errors": []
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.trymaitai.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Maitai-Api-Key
string
header
required

Your Maitai API key from the Portal.

Body

application/json
code
string
required

Python source to validate.

kind
enum<string>

execute (default) = main def execute(ctx); transform = transform_session(session); schema = INPUT/OUTPUT schema RHS expression.

Available options:
execute,
transform,
schema

Response

200 - application/json

Validate workflow script.

data
any