---
title: "Preview Template"
method: POST
path: "/api/declaration-templates/preview"
tags: ["Declaration Templates (Admin)"]
---

# Preview Template

`POST /api/declaration-templates/preview`

Render a preview PDF with sample data.

Body:
    template_type: str (optional, default 'html')
    design_json: dict (preferred for html — block-based editor output)
    html_content: str (legacy — required if design_json absent)
    css_content: str (optional, html only)
    id_modulo: int (required for html type)
    pdf_template_url: str (required for pdf type)

## Headers

- `x-api-token` string, nullable

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/4b44eb76b3ee/schema)
