---
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: >-
  eJztWGuP27gV/SsXRIHMoLLsBmm39X6azWM7BbIZTCbJAoPpihavbO5IpMJL2fEa+u/FJSVb9tgzaYEC+RB/sS3xcc/huS9uhJdzEtNb8cm6+6K0K1BYaKO9tobEXSIUUu50zf/FVLxy65FrDCxlqZXkh2ALkINJcDZ3sl4ALWSNUJcNAXmsIbem0HM6h5X2CzAWVk57pBQuypVcEzj0jTMEzyeTH0EbqjH3kIV9MpBGQYbOWUdZKhJha3Rh90slpmLVmT7trEKRiFo6WaFHx+A2QrPxtfQLkQgjKxRToZVIhMPPjXaoxNS7BhNB+QIrKaYb4dc1jyLvtJmL9pCILV0OC3RocpyCBEK3RDeqtPGoQCs4y1bFb2maZudgHfgFQm/sM4K81Gj8KF9YQgP3uIaz0q7Q5ZIQqGzmCTRGf24QanRg3Vwa/UeAfc4k4BdZ1SUbuSp+08Wnn2afirqZT4xo7yIyJP+TVWuGk1vj0Xj+Keu61HlYZ/w7MZrNELf2Yc0e4KvtyYqkJ8XOfsfci0NObgbwBoqYBtwkKwRl86ZC48OTpaZGloBKe+uA5JLV8N5jTSAdgoRK1qyuIB+twNvw80fwTs/n6LphvXxmjS59fwKkFULhbBWmEC/DtkPWzc0SIAuyPwJqmBNU2/eUscQbBE2gNOXSKVTpnmBuo5ASEXZgV6kd69JrJCYyyuxQSIec/bOppBk5lErOygF9PHv/kC/eXoJyuvBAuTQGHYvyHtdP7/FyT2csLDjL/n0rR39MRv+4675Hd5tJ8rfn7Z+y85OyC36oq6rxbGwKrw1/E/ys/buaRuTXJUJTEzpPsNQSsqsPNzDuQdF4EFvGm3tct9k+RlnpUcA4GmDcA/MQ6272+1waAoV1adeogHJbI0FhHdjGc1xQcPH2klJeNMSCJ5l7Y0uFDrTZc10C7xBTeIWFbEpPrMxs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77H9uN8zWsGnZ7zKOtRV98c8eVNhQGg9eTdKJ2MYB8cuw1by4ugw9siVfSTMgra/E9278DukZXDZ9K/eFnYg8fvHjupQ6hIGg0N79bre3iBTw7O5AEzENV4Vbnd8lYsHeMb0Vm81MEn5wZdvy488NOu6fBicVfEFp4t9KTAtZEj7C19l156Xn8A3cMB6lrY+ZZh1Jafjf1nm0Eu1dm4gFSoUuoI8vXkaMoxuevpv4oANsk37GRZ5j7R8dezeIWFfv3t9wPOguPCureI6TK761k6toZOzZQ5gJzzailGbehDAq4pqhV94PPgfBJqA6SsNmE0fc2Hs0bbtlxfN/JqZt/wPpNTp3
sidebar_class_name: post api-method
info_path: docs/api/nullplatform-api
custom_edit_url: null
canonical: 'https://docs.nullplatform.com/docs/api/workflow-validate'
---
<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>

