---
title: "Create a template type"
method: POST
path: "/template_types"
tags: ["Template types"]
---

# Create a template type

`POST /template_types`

Use this endpoint to create a template type.

## Headers

- `x-oneflow-api-token` string, required

## Request body

- object — Schema for template type request body.
  - `name` string, required — The name of the template type.
  - `description` string — The description of the template type.

## Response `200`

Returns the created template type.

- object — See [Template type](https://developer.oneflow.com/docs/template-type).
  - `_links` object — Links to related endpoints.
    - `comments` object
      - `href` string, nullable
    - `contracts` object
      - `href` string, nullable
    - `contract` object
      - `href` string, nullable
    - `create` object
      - `href` string, nullable
    - `data_field` object
      - `href` string, nullable
    - `data_fields` object
      - `href` string, nullable
    - `events` object
      - `href` string, nullable
    - `event` object
      - `href` string, nullable
    - `files` object
      - `href` string, nullable
    - `file` object
      - `href` string, nullable
    - `next` object
      - `href` string, nullable
    - `parties` object
      - `href` string, nullable
    - `party` object
      - `href` string, nullable
    - `previous` object
      - `href` string, nullable
    - `publish` object
      - `href` string, nullable
    - `self` object
      - `href` string, nullable
    - `template_types` object
      - `href` string, nullable
    - `template_type` object
      - `href` string, nullable
    - `template` object
      - `href` string, nullable
    - `templates` object
      - `href` string, nullable
    - `workspaces` object
      - `href` string, nullable
    - `workspace` object
      - `href` string, nullable
    - `playbooks` object
      - `href` string, nullable
  - `active` boolean, required
  - `created_time` string, datetime, required
  - `data_fields` object[], required
    - `_links` object — Links to related endpoints.
      - `comments` object
        - `href` string, nullable
      - `contracts` object
        - `href` string, nullable
      - `contract` object
        - `href` string, nullable
      - `create` object
        - `href` string, nullable
      - `data_field` object
        - `href` string, nullable
      - `data_fields` object
        - `href` string, nullable
      - `events` object
        - `href` string, nullable
      - `event` object
        - `href` string, nullable
      - `files` object
        - `href` string, nullable
      - `file` object
        - `href` string, nullable
      - `next` object
        - `href` string, nullable
      - `parties` object
        - `href` string, nullable
      - `party` object
        - `href` string, nullable
      - `previous` object
        - `href` string, nullable
      - `publish` object
        - `href` string, nullable
      - `self` object
        - `href` string, nullable
      - `template_types` object
        - `href` string, nullable
      - `template_type` object
        - `href` string, nullable
      - `template` object
        - `href` string, nullable
      - `templates` object
        - `href` string, nullable
      - `workspaces` object
        - `href` string, nullable
      - `workspace` object
        - `href` string, nullable
      - `playbooks` object
        - `href` string, nullable
    - `active` boolean, required
    - `custom_id` string, nullable, required
    - `description` string, required
    - `id` integer, required
    - `name` string, required
    - `placeholder` string, nullable, required
    - `source` 'system' | 'user', required — One of the (sources)(data-field#source) of the data field.
    - `value` string, nullable, required
  - `description` string, nullable, required
  - `extension_type` string, nullable, required
  - `id` integer, required
  - `name` string, required
  - `updated_time` string, datetime, nullable, required

## Other responses

- `400` — Invalid format or content of the request.
- `401` — The API token or the user email is invalid.
- `403` — The request is not authorized by the server.

---

[API](https://skmtc.net/oneflow/apis/public-api-for-oneflow.md) · [All operations](https://skmtc.net/oneflow/apis/public-api-for-oneflow/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneflow/public-api-for-oneflow/versions/0e73a45dec15/schema)
