> For the complete documentation index, see [llms.txt](https://lupemaydana.gitbook.io/learn-mongodb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lupemaydana.gitbook.io/learn-mongodb/the-mongodb-query-language-+-atlas/creating-documents.md).

# Creating Documents

## 📌 insertOne() <a href="#creating-documents-insertone" id="creating-documents-insertone"></a>

Click the create collection button. Then click the insert document button.

**\_id** is the unique id for every document in mongodb

Using mongo shell:

```
db.COLLECTION_NAME.insertOne({title: "this is a title", year: 1900})
```

## 📌 insertMany() <a href="#creating-documents-insertmany" id="creating-documents-insertmany"></a>

Using mongo shell:

```
db.COLLECTION_NAME.insertMany([{_id: "123"},{_id:"124"}])
```

Insert many does an **ordered insert** by default, this means that as soon as this finds an error it will stop inserting documents.

To change the behavior of ordered insert, add after the array a document:

```
{"ordered": false}
```
