---
title: "Configure an index"
method: PATCH
path: "/indexes/{index_name}"
tags: ["Manage Indexes"]
---

# Configure an index

`PATCH /indexes/{index_name}`

Configure an existing index. For guidance and examples, see [Manage indexes](https://docs.pinecone.io/guides/manage-data/manage-indexes).

## Path parameters

- `index_name` string, required

## Headers

- `X-Pinecone-Api-Version` string, required

## Request body

- DbControlConfigureIndexRequest — Configuration used to scale an index.
  - `spec` union — The spec object defines how the index should be deployed. Only some attributes of an index's spec may be updated. In general, you can modify settings related to scaling and configuration but you cannot change the cloud or region where the index is hosted.
    - object
      - `serverless` object, required — Updated configuration for serverless indexes
        - `read_capacity` union — By default the index will be created with read capacity mode `OnDemand`. If you prefer to allocate dedicated read nodes for your workload, you must specify mode `Dedicated` and additional configurations for `node_type` and `scaling`.
          - DbControlReadCapacityOnDemandSpec
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
          - DbControlReadCapacityDedicatedSpec
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `dedicated` DbControlReadCapacityDedicatedConfig, required — Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity.
              - …
    - object
      - `pod` object, required — Updated configuration for pod-based indexes
        - `replicas` integer — The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
        - `pod_type` string — The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.
    - object
      - `byoc` object, required — Updated configuration for a BYOC index
        - `read_capacity` union — By default the index will be created with read capacity mode `OnDemand`. If you prefer to allocate dedicated read nodes for your workload, you must specify mode `Dedicated` and additional configurations for `node_type` and `scaling`.
          - DbControlReadCapacityOnDemandSpec
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
          - DbControlReadCapacityDedicatedSpec
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `dedicated` DbControlReadCapacityDedicatedConfig, required — Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity.
              - …
  - `deletion_protection` string — Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`.
  - `tags` DbControlIndexTags — Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.
  - `embed` object — Configure the integrated inference embedding settings for this index. You can convert an existing index to an integrated index by specifying the embedding model and field_map. The index vector type and dimension must match the model vector type and dimension, and the index similarity metric must be supported by the model. Refer to the [model guide](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) for available models and model details. You can later change the embedding configuration to update the field map, read parameters, or write parameters. Once set, the model cannot be changed.
    - `model` string — The name of the embedding model to use with the index. The index dimension and model dimension must match, and the index similarity metric must be supported by the model. The index embedding model cannot be changed once set.
    - `field_map` object — Identifies the name of the text field from your document model that will be embedded.
    - `read_parameters` object — The read parameters for the embedding model.
    - `write_parameters` object — The write parameters for the embedding model.

## Response `202`

The request to configure the index has been accepted. Check the  index status to see when the change has been applied.

- DbControlIndexModel — The IndexModel describes the configuration and status of a Pinecone index.
  - `name` string, required — The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
  - `dimension` integer — The dimensions of the vectors to be inserted in the index.
  - `metric` string, required — The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. Possible values: `cosine`, `euclidean`, or `dotproduct`.
  - `host` string, required — The URL address where the index is hosted.
  - `private_host` string — The private endpoint URL of an index.
  - `deletion_protection` string — Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`.
  - `tags` DbControlIndexTags — Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.
  - `embed` DbControlModelIndexEmbed — The embedding model and document fields mapped to embedding inputs.
    - `model` string, required — The name of the embedding model used to create the index.
    - `metric` string — The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. Possible values: `cosine`, `euclidean`, or `dotproduct`.
    - `dimension` integer — The dimensions of the vectors to be inserted in the index.
    - `vector_type` string — The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified.
    - `field_map` object — Identifies the name of the text field from your document model that is embedded.
    - `read_parameters` object — The read parameters for the embedding model.
    - `write_parameters` object — The write parameters for the embedding model.
  - `spec` union, required — The spec object defines how the index should be deployed.
    - object
      - `serverless` DbControlServerlessSpecResponse, required — Configuration of a serverless index.
        - `cloud` string, required — The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`.
        - `region` string, required — The region where you would like your index to be created.
        - `read_capacity` union, required — Response containing read capacity configuration
          - DbControlReadCapacityOnDemandSpecResponse
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `status` DbControlReadCapacityStatus, required — The current status of factors affecting the read capacity of a serverless index
              - …
          - DbControlReadCapacityDedicatedSpecResponse
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `dedicated` DbControlReadCapacityDedicatedConfig, required — Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity.
              - …
            - `status` DbControlReadCapacityStatus, required — The current status of factors affecting the read capacity of a serverless index
              - …
        - `source_collection` string — The name of the collection to be used as the source for the index.
        - `schema` DbControlMetadataSchema — Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported.
          - `fields` object, required — A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique.
    - object
      - `pod` DbControlPodSpec, required — Configuration needed to deploy a pod-based index.
        - `environment` string, required — The environment where the index is hosted.
        - `replicas` integer — The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
        - `shards` integer — The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
        - `pod_type` string, required — The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.
        - `pods` integer — The number of pods to be used in the index. This should be equal to `shards` x `replicas`.'
        - `metadata_config` object — Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `metadata_config` is present, only specified metadata fields are indexed. These configurations are only valid for use with pod-based indexes.
          - `indexed` string[] — By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields that should be indexed.
        - `source_collection` string — The name of the collection to be used as the source for the index.
    - object
      - `byoc` DbControlByocSpecResponse, required — Configuration of a BYOC index.
        - `environment` string, required — The environment where the index is hosted.
        - `read_capacity` union, required — Response containing read capacity configuration
          - DbControlReadCapacityOnDemandSpecResponse
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `status` DbControlReadCapacityStatus, required — The current status of factors affecting the read capacity of a serverless index
              - …
          - DbControlReadCapacityDedicatedSpecResponse
            - `mode` string, required — The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified.
            - `dedicated` DbControlReadCapacityDedicatedConfig, required — Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity.
              - …
            - `status` DbControlReadCapacityStatus, required — The current status of factors affecting the read capacity of a serverless index
              - …
        - `schema` DbControlMetadataSchema — Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported.
          - `fields` object, required — A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique.
  - `status` object, required — The current status of the index
    - `ready` boolean, required — Whether the index is ready for use
    - `state` string, required — The state of the index. Possible values: `Initializing`, `InitializationFailed`, `ScalingUp`, `ScalingDown`, `ScalingUpPodSize`, `ScalingDownPodSize`, `Terminating`, `Ready`, or `Disabled`.
  - `vector_type` string, required — The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified.

## Other responses

- `400` — Bad request. The request body included invalid request parameters.
- `401` — Unauthorized. Possible causes: Invalid API key.
- `402` — Payment required. Organization is on a paid plan and is delinquent on payment.
- `403` — You've exceed your pod quota.
- `404` — Index not found.
- `422` — Unprocessable entity. The request body could not be deserialized.
- `500` — Internal server error.

---

[API](https://skmtc.net/pinecone/apis/pinecone-api.md) · [All operations](https://skmtc.net/pinecone/apis/pinecone-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pinecone/pinecone-api/revisions/35876583485d/schema)
