<commit_before>---
code: true
type: page
title: create
description: Collection:create
---

# create

Creates a new [collection](/core/1/guides/essentials/persisted/) in Kuzzle via the persistence engine, in the provided `index`.

<SinceBadge version="1.3.0" />

You can also provide an optional data mapping that allow you to exploit the full capabilities of our
persistent data storage layer, [ElasticSearch](https://www.elastic.co/products/elasticsearch) (check here the [mapping capabilities of ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/mapping.html)).

This method will only update the mapping if the collection already exists.

---

## create([mapping], [options], [callback])

| Arguments  | Type        | Description           |
| ---------- | ----------- | --------------------- |
| `mapping`  | JSON Object | Optional data mapping |
| `options`  | JSON Object | Optional parameters   |
| `callback` | function    | Optional callback     |
<commit_msg>Fix link for Storage guide<commit_after>---
code: true
type: page
title: create
description: Collection:create
---

# create

Creates a new [collection](/core/1/guides/essentials/store-access-data/) in the provided `index`.

<SinceBadge version="1.3.0" />

You can also provide an optional data mapping that allow you to exploit the full capabilities of our
persistent data storage layer, [ElasticSearch](https://www.elastic.co/products/elasticsearch) (check here the [mapping capabilities of ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/mapping.html)).

This method will only update the mapping if the collection already exists.

---

## create([mapping], [options], [callback])

| Arguments  | Type        | Description           |
| ---------- | ----------- | --------------------- |
| `mapping`  | JSON Object | Optional data mapping |
| `options`  | JSON Object | Optional parameters   |
| `callback` | function    | Optional callback     |

{'fraction_non_alphanumeric': 0.15591670898933468, 'fraction_numerical': 0.006094464195022855, 'mean_word_length': 3.1825902335456475, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7141086', 'n_tokens_mistral': 528, 'n_tokens_neox': 521, 'n_words': 176}