---
title: "Create a new template"
method: POST
path: "/api/v1/entity-templates"
tags: ["Entities Templates Management"]
---

# Create a new template

`POST /api/v1/entity-templates`

Create a new template in the system with the provided information

## Request body

- EntityTemplateCreateDtoIn — Input DTO for creating an entity template
  - `identifier` string, required — Unique Entity Template identifier
  - `name` string, required — Unique Entity Template name
  - `description` string — Entity Template description
  - `properties_definitions` PropertyDefinitionDtoIn[] — List of property definitions for this template
    - `name` string, required — Property name
    - `description` string, required — Property description
    - `type` 'STRING' | 'NUMBER' | 'BOOLEAN', required — Property data type
    - `required` boolean — Whether this property is required
    - `rules` PropertyRulesDtoIn — Input DTO for creating or updating a property definition
      - `format` 'URL' | 'EMAIL' — Property format validation
      - `enum_values` string[] — Enumeration values for enum properties
      - `regex` string — Regular expression pattern for validation
      - `max_length` integer — Maximum length for string properties
      - `min_length` integer — Minimum length for string properties
      - `max_value` integer — Maximum value for numeric properties
      - `min_value` integer — Minimum value for numeric properties
  - `relations_definitions` RelationDefinitionDtoIn[] — List of relation definitions for this template
    - `name` string, required — Name of the relation
    - `target_template_identifier` string, required — Identifier of the target template
    - `required` boolean — Whether this relation is required
    - `to_many` boolean — Whether this relation can have multiple targets

## Response `201`

Template created successfully

## Other responses

- `400` — Invalid template data provided

## Changes

- **2026-08-26** `e6f6d45eade3` — 1 warning, 1 info
  - removed the optional property `errorDescription` from the response with the `400` status
  - added the optional property `error_description` to the response with the `400` status
- **2026-05-22** `a4579fa249ab` — 3 warning, 70 info
  - removed the optional property `properties_definitions/items/id` from the response with the `201` status
  - removed the optional property `properties_definitions/items/rules/id` from the response with the `201` status
  - removed the optional property `relations_definitions/items/id` from the response with the `201` status
  - the `name` request property's minLength was decreased from `1` to `0`
  - …69 more
- **2026-04-27** `6022b545ce48` — 2 breaking, 3 warning, 3 info
  - added the new required request property `name`
  - added the new required request property `relations_definitions/items/target_template_identifier`
  - removed the request property `relations_definitions/items/target_entity_identifier`
  - removed the optional property `id` from the response with the `201` status
  - …4 more
- **2026-04-08** `88fc145b6397` — 3 breaking, 73 warning, 5 info
  - added the new required request property `relations_definitions/items/target_entity_identifier`
  - the request property `properties_definitions` became required
  - the `properties_definitions` request property's minItems was increased to `1`
  - removed the request property `name`
  - …77 more

[Change history](https://skmtc.dev/decathlon/apis/idp-core-api/changes/api/v1/entity-templates/post.md)

---

[API](https://skmtc.dev/decathlon/apis/idp-core-api.md) · [All operations](https://skmtc.dev/decathlon/apis/idp-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/decathlon/idp-core-api/revisions/5081d87614ba/schema)
