---
id: workflow-validate
title: "Validate a definition"
description: "Dry-run validation of a definition (graph shape plus step configs) with no writes. Always returns 200; inspect `valid` and `errors`."
sidebar_label: "Validate a definition"
hide_title: true
hide_table_of_contents: true
api: eJztWG1vG7kR/isDokBsd7XSBWmv1X1yEufqAmmMxEkO8Lm31HIk8cwlNxxSik7Qfy+GuyutZDlOCxTIh/iL1rskZ57hM69rEeSMxPhGfHT+bmrcEhROtdVBO0viNhMKqfS65v/FWLz0q4GPFhbSaCX5JbgpyN4mOJl5Wc+B5rJGqE0koIA1lM5O9YxOYanDHKyDpdcBKYdzs5QrAo8hekvwdDT6CbSlGssARZJTgLQKCvTeeSpykQlXo0/SL5UYi2Wr+rjVCkUmaullhQE9g1sLzcrXMsxFJqysUIyFViITHj9F7VGJcfARM0HlHCspxmsRVjWvouC1nYnNoSG25vI4RY+2xDFIIPQL9INK24AKtIKTYjn9Lc/z4hSchzBH6JR9QlAajTYMyrkjtHCHKzgxbom+lIRAJs4yiFZ/igg1enB+Jq3+I8E+ZSPgZ1nVhpVcTn/T04/PJx+ndZyNrNjcNsiQwnOnVgyndDagDfwo69roMp0z/J0YzbqPW4d0Zgfw5fZmRdYZxU1+xzKIQ5tc9+D1GDFOuElWCMqVsUIb0puFpigNoNLBeSC5YDa8C1gTSI8goZI1syvRRysILj3+BMHr2Qx9u6yjzyRqE7obIK0Qpt5VaQvxMaw7FO3eIgNyILsroMg2QbX9TgVTPCJoAqWplF6hyvcIc9MQKRNJArtK7ZmXQSOxIRuaHRLp0Gb/iJW0A49SyYnpmY9371/y+etLUF5PA1AprUXPpLzD1eMyXuzxjIkFJ8W/b+Tgj9Hg77ft7+B2Pcr++nTzp+L0QdolP9RVFQMrm8OF5V+Cn3V4U9OAwsogxJrQB4KFllBcvb+GYQeKhr3YMlzf4WpT7GOUlR4kjIMexj0w97Hudr8rpSVQWBu3QgVUuhoJps6Di4HjgoLz15eU86EpFjxquVfOKPSg7Z7rEgSPmMNLnMpoAjEzi+EBlKEs+ZC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fpNy36Xcayt6Ip/9qCpOzbcIZGJxXb5KP8hH90D+zxqozKo48Rommfgo02lHLhJuu9eW9x2Intt69bP0c60xfxX+6t95aIHrVBue1JuaDXB+dXlmBcM4OxsN3iis7PUV+71vN0oiXK4WKBfpQESTLB0FRJIsLGaINP97KzrjM7O0tTHujBnP9UEXD6DcRTyRua50ZKwk8dMUVA7DnU+tdNy22XBidF3CIXRCyxOczgvg17IwOdKC5LPYQGpXm4Gm5o78m5y5Wwr8eIzlrED6bF0nLESnmTn1GhPVuk3a0OlrWPggjmG5oHvwrgZtSe+w9JjoPR6y5ezM7hDnsJ6VGi5WW0WEAbWmfi0NCSbY7+vT5MSR6GStuc6XT+2N/c95E1v5PitTI3bUBLwcxjWRuqUDFKc6oLwzXaWTAnPbhKeiXEaGG+j3W0m5hwjxzdivZ5IwvfebDb8+lNEz110z19TRFSa+FmJ8VQawi/Y6+RtG6tP4RuYMx81W5c57aoxSuT/tiFUK7G53WRijlKhT+ibDy8ajINr3r7beG8OsMm6HedliXX44trbXt66evPumrNCO/aunOI9Xi55diuXjZLN5CYlm/RuLYy0s5iSqWjOTBOT/RR0kHISqqNmWK+bFdfuDu1ms7VK4P/ZMJvNfwAWN/M7
sidebar_class_name: "post api-method"
info_path: docs/api/workflows
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Validate a definition"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/workflows/definitions/{id}/validate"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Dry-run validation of a definition (graph shape plus step configs) with no writes. Always returns 200; inspect `valid` and `errors`.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Workflow reference: a server-minted id (`wf_...`) or the workflow's client-chosen key (lowercase slug, unique per organization).","example":"wf_ifWBbWfpug0n"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"title":"WorkflowDefinition","type":"object","description":"The workflow definition: the same document the visual editor saves. Steps are a map of step id to step; triggers are always rebuilt server-side from steps of type `trigger`, so a client-supplied `triggers` value is discarded.","required":["name","steps"],"properties":{"name":{"type":"string","description":"Human-readable workflow name.","example":"AMI drift scanner"},"key":{"type":"string","description":"Client-chosen slug (`^[a-z0-9][a-z0-9-]{0,62}$`), unique per organization and immutable. Enables GitOps-style upserts via `PUT /workflows/definitions/{key}`.","example":"ami-drift-scanner"},"description":{"type":"string","example":"Scans deployed scopes for outdated AMIs."},"path":{"type":"string","description":"Folder in the workflows tree. Defaults to `/`.","example":"/action-items/ami-drift"},"nrn":{"type":"string","description":"The nullplatform resource name the workflow is scoped to. Defaults to the caller's organization."},"steps":{"type":"object","description":"Map of step id to step definition. Step ids are alphanumeric (no hyphens).","additionalProperties":{"type":"object"}},"connections":{"type":"array","description":"Edges between steps.","items":{"type":"object"}},"variables":{"type":"object","description":"Per-run variables with optional `initialValue`."},"metadata":{"type":"object"},"semanticVersion":{"type":"string","description":"Optional version label stored on the revision.","example":"1.2.0"}},"additionalProperties":true}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The validation verdict, valid or not.","content":{"application/json":{"schema":{"title":"ValidateResult","type":"object","properties":{"valid":{"type":"boolean"},"errors":{"type":"array","description":"Graph and step-config findings. Includes warnings.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}}}}}}}}},"4XX":{"description":"Client error. The body says what went wrong: an error `type`, a human-readable `detail`, and, on validation failures, one entry per offending field.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}},"5XX":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}}}}
>
  
</StatusCodes>


      