---
title: "Create a template"
method: POST
path: "/templates"
tags: ["Templates"]
---

# Create a template

`POST /templates`

## Request

- Base URL: `https://sg.deployhq.com`
- URL: `https://sg.deployhq.com/templates`
- Auth: HTTP basic

Creates a new template, optionally copying configuration from an existing project.

## Request body

- TemplateObject
  - `template` object, required
    - `name` string
    - `notification_email` string
    - `email_notify` boolean
    - `project_id` string
    - `description` string

## Response `200`

Success

- Template
  - `name` string
  - `permalink` string
  - `description` string

## Other responses

- `401`: You are not authorized to access this resource. You need to authenticate yourself first.
- `403`: You are not allowed to access this resource. You do not have the necessary permissions.
- `422`: Unprocessable Entity
- `500`: An unexpected error occurred on the server. The server was unable to process the request.

---

[API](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation.md) · [All operations](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/revisions/830264ae58be?raw)
