---
title: "POST /collections/{name}/encrypted-indexes"
method: POST
path: "/collections/{name}/encrypted-indexes"
tags: ["encrypted_index"]
---

# POST /collections/{name}/encrypted-indexes

`POST /collections/{name}/encrypted-indexes`

Make a new encrypted index

## Path parameters

- `name` string, required

## Request body

- NewEncryptedIndex
  - `FieldName` string
  - `Type` string

## Response `200`

Encrypted index description

- EncryptedIndex
  - `FieldName` string
  - `Type` string

## Other responses

- `400` — error
- `409` — error

## Changes

- **2026-03-30** `f46903303e53` — 1 info
  - added the non-success response with the status `409`
- **2026-03-02** `efe88dc5e776` — 1 info
  - api operation id `add_encrypted_index` removed and replaced with `new_encrypted_index`
- **2026-03-02** `8c167ee47363` — 1 info
  - api operation id `encrypted_index_add` removed and replaced with `add_encrypted_index`
- **2026-02-18** `1eca1b7dd788` — 1 info
  - api operation id `encrypted_index_create` removed and replaced with `encrypted_index_add`
- **2025-10-16** `df7e1a7888ba` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/sourcenetwork/apis/defradb-api/changes/collections/:name/encrypted-indexes/post.md)

---

[API](https://skmtc.dev/sourcenetwork/apis/defradb-api.md) · [All operations](https://skmtc.dev/sourcenetwork/apis/defradb-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sourcenetwork/defradb-api/revisions/872f0b47a5e5/schema)
