---
title: "Preview Prompt"
method: POST
path: "/api/strategy/preview"
tags: ["strategy", "strategy"]
---

# Preview Prompt

`POST /api/strategy/preview`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/strategy/preview`
- Auth: none declared

Preview a prompt with test data.

Renders the prompt with sample variables and optionally calls
the LLM to generate a response preview.

## Request body

- PreviewPromptRequest: Request to preview a prompt with test data.
  - `state` string, required: Contact state to preview
  - `mode` string, required: Mode: 'reply' or 'outbound'
  - `dummy_message` string, nullable: Test message for preview
  - `prompts_override` object, nullable: Override prompts without saving

## Response `200`

Successful Response

- PreviewPromptResponse: Response from prompt preview.
  - `rendered_prompt` string, required
  - `model_response` string, required
  - `tokens_used` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
