---
title: "Preview a report"
method: POST
path: "/v1/diagrams/{id}/reports/preview"
tags: ["Diagrams"]
---

# Preview a report

`POST /v1/diagrams/{id}/reports/preview`

## Request

- Base URL: `https://api.zindex.ai`
- URL: `https://api.zindex.ai/v1/diagrams/{id}/reports/preview`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

What a report on this version would show Zindex support, drawn as SVG. Nothing is stored. Send the report with the returned seed to keep exactly this anonymized copy.

## Path parameters

- `id` string, required

## Request body

- object
  - `revision` integer: The version to report; default the latest
  - `anonymize` boolean: Preview the anonymized copy (default) or the version as it is

## Response `200`

{ id, revision, anonymized, svg }, plus seed when anonymized: send it with the report to keep exactly this copy

## Other responses

- `400`: INVALID_REQUEST
- `401`: Missing or invalid API key. Response includes a `code` field that distinguishes the failure mode so clients (dashboard, MCP server) can render actionable copy: `AUTH_REQUIRED` (no key or session was sent), `API_KEY_INVALID` (key not found), `API_KEY_REVOKED` (key was revoked, or its person is no longer in its workspace), `API_KEY_EXPIRED` (key passed its expires_at), and for the site's session cookie `SESSION_EXPIRED` (past its 24 hours), `SESSION_REVOKED` (the account's sessions were ended, for example by a password reset) and `SESSION_INVALID` (not a session this server signed).
- `403`: READ_ONLY: a read key or a viewer
- `404`: NOT_FOUND
- `422`: DRAW_TIMEOUT: drawing the version took longer than the drawing budget (20 s), or needed more memory than it allows
- `429`: RATE_LIMITED: over the request rate limit (see Rate Limiting). Wait retryAfter seconds (also the Retry-After header), then try again.
- `503`: BUSY: every drawing worker is busy and the queue is full. Wait retryAfter seconds (also the Retry-After header): half the budget of the drawing refused. Then try again.

---

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