---
title: "Create a credential template"
method: POST
path: "/v1/credential-templates"
tags: ["Credentials"]
---

# Create a credential template

`POST /v1/credential-templates`

Create a credential template for the authenticated tenant. A template binds an existing credential schema to a reusable issuance profile — a name and a validity window (in seconds) — that issuance references by uuid. The referenced schema must belong to the same tenant, otherwise the request returns 404. Requires Authorization: Bearer <tenant API key>.

## Request body

- object
  - `schema` string, uuid, required — UUID of the credential schema this template binds to. Must reference a schema owned by the authenticated tenant; otherwise the request returns 404.
  - `name` string, required — Human-readable name of the template.
  - `validity_seconds` integer — Lifetime, in seconds, to apply to credentials issued from this template (sets expires_at = issuance time + validity_seconds). Defaults to 31536000 (365 days).

## Response `200`

No response body

## Other responses

- `201` — The credential template was created. Returns the full template object.

## Changes

- **2026-06-30** `1ee4908e9af4` — 1 breaking, 1 info
  - added required request body
  - added the success response with the status `201`

[Change history](https://skmtc.dev/didit-protocol/apis/didit-credentials-api/changes/v1/credential-templates/post.md)

---

[API](https://skmtc.dev/didit-protocol/apis/didit-credentials-api.md) · [All operations](https://skmtc.dev/didit-protocol/apis/didit-credentials-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/didit-protocol/didit-credentials-api/revisions/2eeb13158ffa/schema)
