Validate a workflow draft
POST
/v1/forms/{form}/workflow/validate
const url = 'https://api.submeto.com/v1/forms/example/workflow/validate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"definition":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.submeto.com/v1/forms/example/workflow/validate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "definition": {} }'Validates either the supplied definition or the saved draft without mutation.
Requires workflows:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”form
required
string
The form ID.
Request Body
Section titled “Request Body”Media typeapplication/json
object
definition
Complete workflow definition; omit to validate the saved draft.
object
Examplegenerated
{ "definition": {}}Responses
Section titled “Responses”Validation result
Media typeapplication/json
object
data
object
valid
boolean
items
array
estimated_min_cost
integer
estimated_max_cost
integer
request_id
string
Example
{ "data": { "valid": true, "items": [], "estimated_min_cost": 1, "estimated_max_cost": 2 }, "request_id": "REQUEST_ID"}