---
title: "Create update index template"
method: POST
path: "/es/_index_template"
tags: ["Index"]
---

# Create update index template

`POST /es/_index_template`

## Request body

- MetaIndexTemplate
  - `created_at` string
  - `index_patterns` string[]
  - `priority` integer — highest priority is chosen
  - `template` MetaTemplateTemplate
    - `mappings` MetaMappings
      - `properties` object
    - `settings` MetaIndexSettings
      - `analysis` MetaIndexAnalysis
        - `analyzer` object
        - `char_filter` object
        - `filter` object — compatibility with es, alias for TokenFilter
        - `token_filter` object
        - `tokenizer` object
      - `number_of_replicas` integer
      - `number_of_shards` integer
  - `updated_at` string

## Response `200`

OK

- MetaHTTPResponseTemplate
  - `message` string
  - `template` string

## Other responses

- `400` — Bad Request

## Changes

- **2022-08-06** `64901d9f1a5b` — 2 info
  - added the new optional request property `template/mappings/properties/additionalProperties/fields`
  - added the new optional request property `template/mappings/properties/additionalProperties/time_zone`
- **2022-06-24** `b796c7453ce7` — 2 warning
  - removed the request property `template/mappings/properties/additionalProperties/fields`
  - removed the request property `template/mappings/properties/additionalProperties/time_zone`

[Change history](https://skmtc.dev/zincsearch/apis/zinc-search-engine-api/changes/es/_index_template/post.md)

---

[API](https://skmtc.dev/zincsearch/apis/zinc-search-engine-api.md) · [All operations](https://skmtc.dev/zincsearch/apis/zinc-search-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zincsearch/zinc-search-engine-api/revisions/c7ce1991bb9a/schema)
