---
title: "Create a new template"
method: POST
path: "/api/manageTemplate/createTemplate"
tags: ["Manage Template"]
---

# Create a new template

`POST /api/manageTemplate/createTemplate`

## Request body

- CreateTemplateDto
  - `templateName` string, required — The name of the template to be created
  - `templateDir` string, required — The dir of the template

## Response `200`

Template creation result.

## Other responses

- `400` — Invalid input data.
- `500` — Internal server error.

## Changes

- **2024-11-15** `c868708333be` — 1 breaking, 2 info
  - added the new required request property `templateDir`
  - added the non-success response with the status `400`
  - added the non-success response with the status `500`
- **2024-03-04** `df980ba7aa16` — 1 info
  - endpoint added
- **2023-10-20** `bbfe1dbc457f` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/openwebgal/apis/webgal-terre-api/changes/api/manageTemplate/createTemplate/post.md)

---

[API](https://skmtc.dev/openwebgal/apis/webgal-terre-api.md) · [All operations](https://skmtc.dev/openwebgal/apis/webgal-terre-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openwebgal/webgal-terre-api/revisions/ebcacb42f932/schema)
