Validate a workflow graph without saving it
Dry-run validation. ?gate=draft_save answers “would this save as a
draft?” (completeness findings reported but non-blocking); the default
activate answers “would this activate?” — the same split the MCP
validate_workflow_graph tool exposes.
POST
/
v1
/
workflows
/
revisions
/
{revision_id}
/
graph
/
validate
Validate a workflow graph without saving it
curl --request POST \
--url https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/validate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"compiled_graph": {},
"base_version": 123
}
'import requests
url = "https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/validate"
payload = {
"compiled_graph": {},
"base_version": 123
}
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({compiled_graph: {}, base_version: 123})
};
fetch('https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/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://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/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([
'compiled_graph' => [
],
'base_version' => 123
]),
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://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/validate"
payload := strings.NewReader("{\n \"compiled_graph\": {},\n \"base_version\": 123\n}")
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://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/validate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"compiled_graph\": {},\n \"base_version\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/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 = "{\n \"compiled_graph\": {},\n \"base_version\": 123\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"error_count": 123,
"warning_count": 123,
"suggestion_count": 123,
"findings": [
{
"severity": "error",
"rule_id": "<string>",
"category": "<string>",
"message": "<string>",
"node_id": "<string>",
"edge_id": "<string>",
"related_node_ids": [
"<string>"
],
"related_edge_ids": [
"<string>"
],
"source_span": {
"start_line": 123,
"start_col": 123,
"end_line": 123,
"end_col": 123,
"raw_text_excerpt": "<string>"
},
"suggested_fix": "<string>",
"related_spans": [
{
"start_line": 123,
"start_col": 123,
"end_line": 123,
"end_col": 123,
"raw_text_excerpt": "<string>"
}
]
}
],
"normalized_graph": {},
"blocking_error_count": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Query Parameters
Available options:
draft_save, activate Body
application/json
Response
Successful Response
Validation result for a submitted CompiledWorkflowGraph payload.
Was this page helpful?
⌘I
Validate a workflow graph without saving it
curl --request POST \
--url https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/validate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"compiled_graph": {},
"base_version": 123
}
'import requests
url = "https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/validate"
payload = {
"compiled_graph": {},
"base_version": 123
}
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({compiled_graph: {}, base_version: 123})
};
fetch('https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/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://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/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([
'compiled_graph' => [
],
'base_version' => 123
]),
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://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/validate"
payload := strings.NewReader("{\n \"compiled_graph\": {},\n \"base_version\": 123\n}")
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://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/validate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"compiled_graph\": {},\n \"base_version\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph/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 = "{\n \"compiled_graph\": {},\n \"base_version\": 123\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"error_count": 123,
"warning_count": 123,
"suggestion_count": 123,
"findings": [
{
"severity": "error",
"rule_id": "<string>",
"category": "<string>",
"message": "<string>",
"node_id": "<string>",
"edge_id": "<string>",
"related_node_ids": [
"<string>"
],
"related_edge_ids": [
"<string>"
],
"source_span": {
"start_line": 123,
"start_col": 123,
"end_line": 123,
"end_col": 123,
"raw_text_excerpt": "<string>"
},
"suggested_fix": "<string>",
"related_spans": [
{
"start_line": 123,
"start_col": 123,
"end_line": 123,
"end_col": 123,
"raw_text_excerpt": "<string>"
}
]
}
],
"normalized_graph": {},
"blocking_error_count": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}