---
title: "Create new empty ONS Elasticsearch index"
method: POST
path: "/search"
tags: ["private"]
---

# Create new empty ONS Elasticsearch index

`POST /search`

## Request

- Base URL: `/v1` (relative, and the document’s source URL is not known)
- URL: `/v1/search`
- Auth: API key in header `Authorization`

Request a new search index and receive the name of the new index created in response. Endpoint requires service or user authentication.

## Response `200`

OK

- PostSearchResponse
  - `index_name` string, required: Name of new empty search index

## Other responses

- `400`: The request was invalid.
- `401`: Failed to process the request due to being unauthorised.
- `500`: Internal server error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/search-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/search-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/search-api/revisions/33e6751db807?raw)
