---
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`

Add an encrypted index

## Path parameters

- `name` string, required

## Request body

- EncryptedIndexAdd
  - `FieldName` string
  - `Type` string

## Response `200`

Encrypted index description

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

## Other responses

- `400` — error
- `default`

## Changes

- **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
- **2025-06-02** `60812f5416c5` — 1 breaking
  - api path removed without deprecation

[Change 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.dev/sourcenetwork/apis/defradb-api/revisions/e5def1d468f5?raw)
