---
title: "Update a JWT template"
method: PATCH
path: "/jwt_templates/{template_id}"
tags: ["JWT Templates"]
---

# Update a JWT template

`PATCH /jwt_templates/{template_id}`

Updates an existing JWT template

## Path parameters

- `template_id` string, required

## Request body

- object
  - `name` string, required — JWT template name
  - `claims` object, required — JWT template claims in JSON format
  - `lifetime` integer, nullable — JWT lifetime
  - `allowed_clock_skew` integer, nullable — JWT allowed clock skew
  - `custom_signing_key` boolean — Whether a custom signing key/algorithm is also provided for this template
  - `signing_algorithm` string, nullable — The custom signing algorithm to use when minting JWTs. Required if `custom_signing_key` is `true`.
  - `signing_key` string, nullable — The custom signing private key to use when minting JWTs. Required if `custom_signing_key` is `true`.

## Response `200`

Success

- JWTTemplate
  - `object` 'jwt_template', required
  - `id` string, required
  - `name` string, required
  - `claims` object, required
  - `lifetime` integer, required
  - `allowed_clock_skew` integer, required
  - `custom_signing_key` boolean, required
  - `signing_algorithm` string, required
  - `created_at` integer, required — Unix timestamp of creation.
  - `updated_at` integer, required — Unix timestamp of last update.

## Other responses

- `400` — Request was not successful
- `402` — Payment required
- `422` — Invalid request parameters

---

[API](https://skmtc.net/clerk/apis/clerk-backend-api.md) · [All operations](https://skmtc.net/clerk/apis/clerk-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clerk/clerk-backend-api/revisions/cf036e7951d3/schema)
