---
title: "Validate workflow head"
method: POST
path: "/agents/v2/workflows/{workflowId}/head/validate"
tags: ["Files"]
---

# Validate workflow head

`POST /agents/v2/workflows/{workflowId}/head/validate`

## Request

- Base URL: `https://odyssey.asteroid.ai`
- URL: `https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/head/validate`
- Auth: API key in header `X-Api-Key`

Validate the editable head without changing it: the checks publish and run apply, as blocking errors and advisory warnings; the environment's capability rule; and what only the head's files show: a Python file nothing can run, a scripted node whose script is not in its directory, a script whose entry function takes no args while the node declares inputs, a script that hands off to a node that is not one of its transitions.

## Path parameters

- `workflowId` string, uuid, required

## Response `200`

The request has succeeded.

- WorkflowsVersionValidationResponse: Result of validating a workflow version spec without persisting it
  - `issues` AgentsWorkflowWorkflowValidationIssue[], required: All validation issues found. The workflow can run only if none have error severity.
    - `message` string, required
    - `path` string[], required: Path to the offending field, e.g. ["nodes", "My Node", "model"].
    - `severity` 'error' | 'warning', required: Severity of a workflow validation issue. Error-severity issues make the workflow un-runnable; warnings are advisory.

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `401`: Access is unauthorized.
- `403`: Access is forbidden.
- `404`: The server cannot find the requested resource.
- `500`: Server error

---

[API](https://skmtc.dev/asteroid/apis/agent-service.md) - [All operations](https://skmtc.dev/asteroid/apis/agent-service/llms.txt) - [OpenAPI document](https://skmtc.dev/asteroid/apis/agent-service/revisions/ccc134d1d510?raw)
