---
title: "Pin a version (null unpins)"
method: POST
path: "/v1/templates/{id}/pin"
tags: ["Templates"]
---

# Pin a version (null unpins)

`POST /v1/templates/{id}/pin`

## Request

- Base URL: `https://api.castpdf.com`
- URL: `https://api.castpdf.com/v1/templates/{id}/pin`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `version` integer, nullable, required

## Response `200`

OK

- Template
  - `id` string, uuid
  - `name` string
  - `current_version` integer
  - `pinned_version` integer, nullable
  - `updated_at` string, date-time
  - `thumbnail_url` string, uri: Signed PNG of the current version first page (480 px wide, rendered with its sample data); made on first request, the url changes with each version.
  - `version` integer
  - `html` string
  - `css` string, nullable
  - `sample_data` object, nullable
  - `settings` object

## Other responses

- `default`: Error

---

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