---
title: "Retrieve specific asset preview"
method: GET
path: "/assets/{asset_id}/preview"
tags: ["Assets"]
---

# Retrieve specific asset preview

`GET /assets/{asset_id}/preview`

## Request

- Base URL: `https://enterprise.knak.io/api/published/v1`
- URL: `https://enterprise.knak.io/api/published/v1/assets/{asset_id}/preview`
- Auth: none declared
- TypeScript: <https://skmtc.dev/knak/apis/knak-enterprise-api/docs/assets/:asset_id/preview/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a rendered preview of a specific asset. The returned `url` is publicly accessible without authentication. A 202 response with `url` set to null means the preview is still being generated; the client should poll this endpoint again until a 200 is returned.

Use the `client` and `details` query parameters to control how the preview is rendered. `client` applies to both the `png` and `pdf` formats. `details` only takes effect for `format=pdf` with `client=desktop`; it is ignored for `png` and for `pdf` with `client=mobile`.

## Path parameters

- `asset_id` string, required

## Query parameters

- `format` 'png' | 'pdf'
- `client` 'desktop' | 'mobile'
- `details` boolean

## Response `200`

Preview is ready. The `url` is populated and publicly accessible.

- AssetPreview
  - `data` object
    - `id` string
    - `format` 'png' | 'pdf'
    - `client` 'desktop' | 'mobile'
    - `details` boolean: Whether the email details header is included in the returned preview. Only `false` when the preview was rendered for `format=pdf` with `client=desktop` and `details=false` was requested; `true` in all other cases.
    - `url` string, nullable: Publicly accessible preview URL (no authentication required). Null while the preview is still being generated (HTTP 202).

## Other responses

- `202`: Preview is still being generated. The `url` is null; poll again until a 200 is returned.
- `400`: Bad Request
- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Not Found

---

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