---
title: "Get preview info for a file"
method: GET
path: "/matters/{matterId}/documents/files/{fileId}/preview"
tags: ["Files"]
---

# Get preview info for a file

`GET /matters/{matterId}/documents/files/{fileId}/preview`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}/preview`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Returns a presigned URL to the PDF preview of the current version of the specified file.
The URL is valid for 1 day from the time of the request.
            
This endpoint never creates a preview. Use CreatePreview to request one; while the conversion is still pending
this endpoint returns 404.

## Path parameters

- `matterId` string, required
- `fileId` string, required

## Response `200`

When the request is successful. Returns a 'PreviewFileInfo' object.

- PreviewFileInfo
  - `fileId` string, nullable: Unique identifier of the requested file
  - `documentVersionId` string, nullable: Unique identifier of the document version the preview was generated from. Pass this to GetPreviewById.
  - `downloadUrl` string, nullable: Temporary presigned URL to download the PDF preview. Valid for 1 day. Null when the preview has not been generated yet (conversion is pending); poll GetPreviewById until it is available.
  - `expiry` string, date-time, nullable: Expiry date/time (UTC) after which the download link is no longer accessible. Null when the preview has not been generated yet (conversion is pending).

## Other responses

- `400`: When a supplied id is not a valid GUID.
- `403`: When the file does not belong to the authenticated account or to the specified matter, or does not exist.
- `404`: When the file has no uploaded version yet, or no preview exists for the current version (for example the conversion requested by CreatePreview is still pending).

## Changes

- **2026-08-26** `db1b8a86b58e`: 1 info
  - added the optional property `errors` to the response with the `400` status

[Operation history](https://skmtc.dev/smokeball/apis/smokeball-api/changes/matters/:matterId/documents/files/:fileId/preview/get.md)

---

[API](https://skmtc.dev/smokeball/apis/smokeball-api.md) - [All operations](https://skmtc.dev/smokeball/apis/smokeball-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smokeball/apis/smokeball-api/revisions/6e350cf667d4?raw)
