Validate a workflow
curl --request POST \
--url https://inference.studio.lyzr.ai/api/workflows/validate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://inference.studio.lyzr.ai/api/workflows/validate"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://inference.studio.lyzr.ai/api/workflows/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inference.studio.lyzr.ai/api/workflows/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://inference.studio.lyzr.ai/api/workflows/validate"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://inference.studio.lyzr.ai/api/workflows/validate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://inference.studio.lyzr.ai/api/workflows/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"ok": false,
"issues": [
{
"severity": "error",
"code": "missing_parameter",
"nodeId": "3",
"nodeName": "HTTP Request",
"path": "parameters.url",
"message": "url is required"
},
{
"severity": "warning",
"code": "unknown_parameter",
"nodeId": "5",
"nodeName": "Set",
"path": "parameters.optoins",
"message": "unknown parameter \"optoins\"",
"hint": "options"
}
]
}Workflows
Validate Workflow
Checks a workflow against the published contract for each node type without saving it. Accepts either the save envelope ({"flow_data": {...}}) or bare workflow JSON. The same check runs when you create or update a workflow.
POST
/
workflows
/
validate
Validate a workflow
curl --request POST \
--url https://inference.studio.lyzr.ai/api/workflows/validate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://inference.studio.lyzr.ai/api/workflows/validate"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://inference.studio.lyzr.ai/api/workflows/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inference.studio.lyzr.ai/api/workflows/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://inference.studio.lyzr.ai/api/workflows/validate"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://inference.studio.lyzr.ai/api/workflows/validate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://inference.studio.lyzr.ai/api/workflows/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"ok": false,
"issues": [
{
"severity": "error",
"code": "missing_parameter",
"nodeId": "3",
"nodeName": "HTTP Request",
"path": "parameters.url",
"message": "url is required"
},
{
"severity": "warning",
"code": "unknown_parameter",
"nodeId": "5",
"nodeName": "Set",
"path": "parameters.optoins",
"message": "unknown parameter \"optoins\"",
"hint": "options"
}
]
}Validation checks every node against the published contract for its node type, as returned by the node catalog. The same check runs when you create or update a workflow, and those responses carry the same
issues array. See Validation for every issue code.Authorizations
Lyzr API key. Studio session keys (agk_, ags_) and durable sk- keys are accepted. Required on every endpoint except GET /node-types and a webhook-triggered execute that carries X-Webhook-Secret.
Body
application/json
The save envelope or bare workflow JSON.