# Validate a bundle

> Check a staged bundle against the spec, the credential and const wiring, and (for code) TypeScript. Nothing is persisted.

Source: https://docs.generalinput.com/api/workflows/validate



<Endpoint method="POST" path="/v1/workflows/:id/validate" />

<Access scope="workflows:manage" />

The real compile gate. Code workflows are type-checked server-side against the real `@general-input/core`; apps get the design-system lint and handler references; agent workflows get the `agent.json` schema and a non-empty `instructions.md`.

## Body [#body]

| Field       | Type   | Required | Notes                                                       |
| ----------- | ------ | -------- | ----------------------------------------------------------- |
| `bundleKey` | string | yes      | From [bundle upload URL](/api/workflows/bundle-upload-url). |

## Response [#response]

```json
{
  "valid": false,
  "errors": [
    {
      "path": "main.ts",
      "message": "Property 'foo' does not exist on type 'WorkflowContext'."
    },
    { "message": "Credential slot 'slack' is not wired." }
  ]
}
```

`path` is present when an error belongs to one file. A `valid: true` response has an empty `errors` array.
