---
title: "Create a new index"
method: POST
path: "/v2/index"
tags: ["Search & Match - Indexing"]
deprecated: true
---

# Create a new index

`POST /v2/index`

> **Deprecated.**

Create an index for the search tool

## Request body

- IndexCreate
  - `name` string, required — Unique index name
  - `docType` 'resumes' | 'job_descriptions'

## Response `201`

Returns the created index

- Index
  - `name` string, required — Unique index name
  - `docType` 'resumes' | 'job_descriptions', required
  - `user` IndexUser, required — The user who created this index
    - `id` integer, required — Resthook subscription's ID.
    - `name` string, required
    - `email` string, required
    - `avatar` string, nullable, required — URL of the user's avatar.

## Other responses

- `400` — Bad request. If it is a validation error will contain a list of each invalid field
- `401` — Authorisation error
- `default` — UnexpectedError

---

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