---
title: "Preview a link"
method: GET
path: "/v1/link-preview"
tags: ["link-preview"]
---

# Preview a link

`GET /v1/link-preview`

## Request

- Base URL: `https://api.brixsignage.com`
- URL: `https://api.brixsignage.com/v1/link-preview`
- Auth: HTTP bearer

Return a preview image of a web page: a screenshot of the page, sized to the optional `w` and `h`, or a card with the site's icon when no screenshot can be made. The page is fetched on the server, only from public addresses, and the screenshot is kept for seven days.

**Notes.**
- Answers an IMAGE, not JSON: a screenshot of the page (cached for 7 days and resized to `w` × `h`), or, when no capture can be made, an SVG card with the site's icon. It always answers 200 for an allowed address.

## Query parameters

- `url` string, required
- `w` integer
- `h` integer
- `fit` string

## Response `200`

Success. The body is the file itself.

## Other responses

- `400`: `url` is missing, not http(s), or not a public address (plain text body).
- `401`: Missing, expired or revoked bearer token.
- `403`: The token lacks the permission this operation needs (see `x-brix-permission`).
- `5XX`: Server error. The body carries a `requestId` to quote to support.

---

[API](https://skmtc.dev/brixsignage/apis/brix-api.md) · [All operations](https://skmtc.dev/brixsignage/apis/brix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/brixsignage/apis/brix-api/revisions/02fd3665dc7d?raw)
