# Create Search Index

> Creates a new search index with the specified configuration

## Endpoint

`POST https://api.upstash.com/v2/search`

## Request body

- `name` (string, required): Name of the search index
- `region` (enum<string>, required): Region of the index
- `type` (enum<string>, required): Index payment type. Currently 'free' and 'payg' are available.

## Responses

### 200 - Index created successfully

- `customer_id` (string): The associated ID of the owner of the index
- `id` (string): Unique ID of the index
- `name` (string): Name of the search index
- `endpoint` (string): The REST endpoint of the index
- `type` (enum<string>): The payment plan of the index
- `region` (enum<string>): The region where the index is currently deployed
- `vercel_email` (string): The email associated with Vercel integration, if any. Empty string otherwise.
- `token` (string): The REST authentication token for the index
- `read_only_token` (string): The REST authentication read only token for the search index
- `max_vector_count` (integer): Maximum number of vectors allowed in the index
- `max_monthly_reranks` (integer): Maximum monthly rerank operations (-1 for unlimited)
- `max_daily_updates` (integer): Maximum daily update operations (-1 for unlimited)
- `max_daily_queries` (integer): Maximum daily query operations (-1 for unlimited)
- `max_monthly_bandwidth` (integer): Maximum monthly bandwidth in bytes (-1 for unlimited)
- `max_writes_per_second` (integer): Maximum write operations per second (rate limit)
- `max_query_per_second` (integer): Maximum query operations per second (rate limit)
- `max_reads_per_request` (integer): Maximum number of reads allowed per request
- `max_writes_per_request` (integer): Maximum number of writes allowed per request
- `creation_time` (integer): Unix timestamp of creation
- `input_enrichment_enabled` (boolean): Whether input enrichment is enabled for this index
- `throughput_vector` (object[]): Throughput metrics over time
  - `x` (string): Timestamp when measurement was taken
  - `y` (number): The measured value

## cURL

```bash
curl --request POST \
  --url https://api.upstash.com/v2/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "mySearchIndex",
    "region": "eu-west-1",
    "type": "payg"
  }'
```
