---
title: "Validate Workflow"
method: POST
path: "/api/v1/workflow/{workflow_id}/validate"
tags: ["main"]
---

# Validate Workflow

`POST /api/v1/workflow/{workflow_id}/validate`

Validate all nodes in a workflow to ensure they have required fields.

Args:
    workflow_id: The ID of the workflow to validate
    user: The authenticated user

Returns:
    Object indicating if workflow is valid and any invalid nodes/edges

## Path parameters

- `workflow_id` integer, required

## Headers

- `authorization` string, nullable
- `X-API-Key` string, nullable

## Response `200`

Successful Response

- ValidateWorkflowResponse
  - `is_valid` boolean, required
  - `errors` WorkflowError[], required
    - `kind` 'node' | 'edge' | 'workflow', required
    - `id` string, nullable, required
    - `field` string, nullable, required
    - `message` string, required

## Other responses

- `404` — Not found
- `422` — Validation Error

---

[API](https://skmtc.dev/dograh/apis/dograh-api.md) · [All operations](https://skmtc.dev/dograh/apis/dograh-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dograh/dograh-api/revisions/e7d045c0295a/schema)
