---
title: "Create a schema indexes."
method: POST
path: "/api/apps/{app}/schemas/{schema}/indexes"
tags: ["Schemas"]
---

# Create a schema indexes.

`POST /api/apps/{app}/schemas/{schema}/indexes`

## Path parameters

- `app` string, required
- `schema` string, required

## Request body

- CreateIndexDto
  - `fields` IndexFieldDto[], required — The index fields.
    - `name` string, required — The name of the field.
    - `order` 'Ascending' | 'Descending', required

## Response `204`

## Other responses

- `400` — Validation error.
- `404` — Schema or app not found.
- `500` — Operation failed.

---

[API](https://skmtc.net/squidex/apis/squidex-api.md) · [All operations](https://skmtc.net/squidex/apis/squidex-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/squidex/squidex-api/versions/b4a9b62f113a/schema)
