---
title: "Update a template"
method: PATCH
path: "/api/v1/templates/{template_id}"
tags: ["Templates"]
---

# Update a template

`PATCH /api/v1/templates/{template_id}`

## Request

- Base URL: `https://www.ifillpdf.com`
- URL: `https://www.ifillpdf.com/api/v1/templates/{template_id}`
- Auth: HTTP bearer

Updates your own template metadata and visibility. Only the creator can edit. Public publishing stays admin-only.

## Path parameters

- `template_id` string, uuid, required

## Request body

- UpdateTemplateRequest
  - `name` string
  - `description` string
  - `category` string
  - `tags` string[]
  - `language` string
  - `visibility` 'private' | 'team': public is rejected (admin-only).

## Response `200`

Updated template.

- TemplateEnvelope
  - `template` Template, required
    - `id` string, uuid, required
    - `name` string, required
    - `description` string, nullable
    - `category` string, nullable
    - `language` string, nullable
    - `tags` string[]
    - `visibility` 'public' | 'team' | 'private', required
    - `is_published` boolean
    - `page_count` integer
    - `preview_image_url` string, nullable
    - `created_at` string, date-time

## Other responses

- `400`: Invalid request.
- `403`: Authenticated but not allowed (not the creator, or public publishing).
- `404`: Resource not found.
- `409`: Invalid request.

---

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