---
title: "Create a collection's indexes in mongo"
method: POST
path: "/indexes/{collection}"
tags: ["Indexes"]
---

# Create a collection's indexes in mongo

`POST /indexes/{collection}`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/indexes/{collection}`
- Auth: none declared

Creates all pre-defined indexes for a specific collection.

## Path parameters

- `collection` string, required

## Response `200`

The current status of the index creation process.

- IndexesCreateIndexesResponse200
  - `unchanged` integer
  - `changed` integer
  - `total` integer: The total number of documents
  - `running` boolean

## Other responses

- `500`: Error response from API

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
