---
title: "Update template"
method: PUT
path: "/templates/{slug}"
tags: ["templates"]
---

# Update template

`PUT /templates/{slug}`

Update the name or content of a template. Slug cannot be changed.

## Path parameters

- `slug` string, required

## Request body

- TemplateUpdateForm
  - `name` string — Name of the template.
  - `content` string, required — HTML content of the template.

## Response `200`

Template updated

- Template
  - `success` boolean
  - `template` object
    - `slug` string
    - `created` integer
    - `name` string

## Other responses

- `400` — Bad request.
- `401` — Unauthorized. Invalid auth key.
- `404` — Template not found.
- `429` — Too Many Requests. You have been rate limited.
- `500` — Internal Server Error.

---

[API](https://skmtc.dev/pdfshift/apis/pdfshift-api-documentation.md) · [All operations](https://skmtc.dev/pdfshift/apis/pdfshift-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pdfshift/pdfshift-api-documentation/revisions/0b8cbae61b89/schema)
