---
title: "Preview Playground Report"
method: POST
path: "/api/v1/alerts/preview/playground-report"
tags: ["ALERTS_V1"]
---

# Preview Playground Report

`POST /api/v1/alerts/preview/playground-report`

Preview what a playground report would look like.

Regenerates the session through the same ask pipeline a scheduled run uses,
so the preview shows the content the next delivery would carry — it costs an
LLM run and appends a new assistant turn to the session, but nothing is
delivered and no run is recorded. Blocks for the length of that run.

Distinct from ``/preview`` because playground reports have no metric_config
and need no ClickHouse access.

## Request body

- PlaygroundReportPreviewRequest — Preview a playground report from a Studio session, before/without saving a rule. Regenerates the session through the same ask pipeline a scheduled run uses, then renders the fresh answer — no delivery, and the turns the run appends are discarded once rendered.
  - `session_id` string, required
  - `content_scope` string — first_query | last_answer | full_chat
  - `report_name` string, nullable — The rule's name (or the name typed into an unsaved form). Reaches the subject line, so pass it for the preview to match what a scheduled run would send. Falls back to a placeholder.

## Response `200`

Successful Response

- PlaygroundReportPreviewResponse
  - `session_id` string, required
  - `content_scope` string, required
  - `content` string, required — Report body as markdown
  - `html` string, required — Rendered email HTML
  - `subject` string, required
  - `first_question` string, nullable
  - `playground_url` string, required
  - `generated_at` string, date-time, required
  - `is_empty` boolean, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/revisions/b9cc757ca795/schema)
