---
title: "Preview Workflow Prompts"
method: POST
path: "/api/v1/workflow/{workflow_id}/prompt-preview"
tags: ["main"]
---

# Preview Workflow Prompts

`POST /api/v1/workflow/{workflow_id}/prompt-preview`

## Request

- Base URL: `https://app.dograh.com`
- URL: `https://app.dograh.com/api/v1/workflow/{workflow_id}/prompt-preview`
- Auth: none declared
- TypeScript: <https://skmtc.dev/dograh/apis/dograh-api/docs/api/v1/workflow/:workflow_id/prompt-preview/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `workflow_id` integer, required

## Headers

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

## Request body

- PromptPreviewRequest
  - `prompt_variables` PromptVariablesConfiguration
    - `mode` 'inline' | 'call_context': Enable prompt caching optimization with call_context. Dograh manages explicit caching automatically for eligible providers and models.
    - `call_context_note` string, nullable
    - `include_weekday` boolean
  - `sample_values` object, nullable
  - `sample_run_id` integer, nullable
  - `workflow_definition` object, nullable

## Response `200`

Successful Response

- PromptPreviewResponse
  - `nodes` NodePromptPreview[], required
    - `node_id` string, required
    - `node_name` string, required
    - `system_prompt` string, required
    - `tools` object[], required
    - `variables` string[], required
    - `unresolved_variables` string[], required
    - `static_tokens_estimate` integer, required
    - `per_call_tokens_estimate` integer, required
    - `cache_status` string, nullable
  - `call_context` string, nullable, required
  - `provider` string, nullable, required
  - `model` string, nullable, required
  - `explicit_cache_available` boolean, required
  - `minimum_tokens` integer, nullable
  - `notices` string[], required
  - `default_note` string, required

## Other responses

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

## Changes

- **2026-11-10** `d561dc641350`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/dograh/apis/dograh-api/changes/api/v1/workflow/:workflow_id/prompt-preview/post.md)

---

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