---
title: "Unset current index"
method: POST
path: "/api/v2/indexing/unset-current"
tags: ["IndexV2"]
---

# Unset current index

`POST /api/v2/indexing/unset-current`

## Request

- Base URL: `https://indexing-dev.hawksearch.net`
- URL: `https://indexing-dev.hawksearch.net/api/v2/indexing/unset-current`
- Auth: none declared. Required headers: `X-HawkSearch-ApiKey`
- TypeScript: <https://skmtc.dev/hawksearch/apis/hawksearch-elasticsearch-indexingapi/docs/api/v2/indexing/unset-current/post.ts> (a function with typed inputs; its response is checked against the schema)

Set current index unsets current index and optionally deletes it.  This will be the index that will be used when calling Hawksearch search methods

## Headers

- `X-HawkSearch-ApiKey` string, required

## Request body

- UnsetIndexParams: Unset index params
  - `DeleteAfterUnset` boolean: Determines if index should be deleted after unset

## Response `200`

OK

- object

---

[API](https://skmtc.dev/hawksearch/apis/hawksearch-elasticsearch-indexingapi.md) - [All operations](https://skmtc.dev/hawksearch/apis/hawksearch-elasticsearch-indexingapi/llms.txt) - [OpenAPI document](https://skmtc.dev/hawksearch/apis/hawksearch-elasticsearch-indexingapi/revisions/24cba7bf3468?raw)
