---
title: "Test Workflow"
method: POST
path: "/v1/workflows/{id}/test"
tags: ["Workflow"]
---

# Test Workflow

`POST /v1/workflows/{id}/test`

## Request

- Base URL: `https://api.sandbox.usenash.com`
- URL: `https://api.sandbox.usenash.com/v1/workflows/{id}/test`
- Auth: none declared

Run a workflow against a real entity without activating it. Requires jobId or orderId — the entity the run is evaluated against. By default this is a dry run: filters are evaluated against the entity and each action returns a preview of what it would do, without performing it. With live=true, messaging actions (send_slack, send_email, send_sms) are sent with a [Test] prefix and ai_decision calls the model; every other action stays preview-only and its preview carries a note saying so, so a live test can never apply a state change such as cancel_order or add_tag. Returns per-node status, so a caller can confirm which filters passed before activating the workflow.

## Path parameters

- `id` string, required

## Request body

- TestWorkflowSerializer
  - `jobId` string, nullable: Job ID to build the workflow context from. Provide jobId or orderId (or both).
  - `orderId` string, nullable: Order ID to build the workflow context from. Provide jobId or orderId (or both).
  - `live` boolean: When false (default) the run is a dry run: filters are evaluated against the real entity and every action returns a preview without performing it (ai_decision follows uncertain). When true, messaging actions (send_slack, send_email, send_sms) are performed with content prefixed by [Test], and ai_decision sends its expanded question and context to Typesafe and follows the selected branch. All other actions remain preview-only.

## Other responses

- `422`: Unprocessable Content

---

[API](https://skmtc.dev/nash/apis/nash-api.md) - [All operations](https://skmtc.dev/nash/apis/nash-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nash/apis/nash-api/revisions/e3713837c5c9?raw)
