> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage serverless indexes

> List, describe, configure, and delete serverless indexes in Pinecone, including tags and deletion protection.

This page shows you how to manage your existing serverless indexes.

> [!NOTE]
>
> On API version `2026-07`, the REST `describe_index` and `list_indexes` responses replace the top-level `dimension`, `metric`, `vector_type`, and `spec` with top-level `deployment`, `read_capacity`, and `schema` objects, so `dimension` and `metric` now appear on the schema's dense-vector field. The `curl` examples below show this shape. The SDKs return both the new fields and the older top-level ones for backward compatibility, so the SDK examples still show `dimension`, `metric`, and `spec`. See [Move to the Documents API](https://docs.pinecone.io/guides/indexes/move-to-the-documents-api.md) for details.

## List indexes

Use the [List indexes](https://docs.pinecone.io/reference/api/latest/control-plane/list_indexes.md) operation to get a complete description of all indexes in a project:

```Python Python theme={null}
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

index_list = pc.list_indexes()

print(index_list)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone'

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })

const indexList = await pc.listIndexes();

console.log(indexList);
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;
import org.openapitools.db_control.client.model.*;

public class ListIndexesExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        IndexList indexList = pc.listIndexes();
        System.out.println(indexList);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func prettifyStruct(obj interface{}) string {
    bytes, _ := json.MarshalIndent(obj, "", "  ")
    return string(bytes)
}

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    idxs, err := pc.ListIndexes(ctx)
    if err != nil {
        log.Fatalf("Failed to list indexes: %v", err)
    } else {
        for _, index := range idxs {
            fmt.Printf("index: %v\n", prettifyStruct(index))
        }
    }
}
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -i -X GET "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07"
```

The response will look like this:

```python Python theme={null}
[{
    "name": "docs-example-sparse",
    "metric": "dotproduct",
    "host": "docs-example-sparse-govk0nt.svc.aped-4627-b74a.pinecone.io",
    "spec": {
        "serverless": {
            "cloud": "aws",
            "region": "us-east-1"
        }
    },
    "status": {
        "ready": true,
        "state": "Ready"
    },
    "vector_type": "sparse",
    "dimension": null,
    "deletion_protection": "disabled",
    "tags": {
        "environment": "development"
    }
}, {
    "name": "docs-example-dense",
    "metric": "cosine",
    "host": "docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io",
    "spec": {
        "serverless": {
            "cloud": "aws",
            "region": "us-east-1"
        }
    },
    "status": {
        "ready": true,
        "state": "Ready"
    },
    "vector_type": "dense",
    "dimension": 1536,
    "deletion_protection": "disabled",
    "tags": {
        "environment": "development"
    }
}]
```

```javascript JavaScript theme={null}
{
  indexes: [
    {
      name: 'docs-example-sparse',
      dimension: undefined,
      metric: 'dotproduct',
      host: 'docs-example-sparse-govk0nt.svc.aped-4627-b74a.pinecone.io',
      deletionProtection: 'disabled',
      tags: { environment: 'development', example: 'tag' },
      embed: undefined,
      spec: { pod: undefined, serverless: { cloud: 'aws', region: 'us-east-1' } },
      status: { ready: true, state: 'Ready' },
      vectorType: 'sparse'
    },
    {
      name: 'docs-example-dense',
      dimension: 1536,
      metric: 'cosine',
      host: 'docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io',
      deletionProtection: 'disabled',
      tags: { environment: 'development', example: 'tag' },
      embed: undefined,
      spec: { pod: undefined, serverless: { cloud: 'aws', region: 'us-east-1' } },
      status: { ready: true, state: 'Ready' },
      vectorType: 'dense'
    }
  ]
}
```

```java Java theme={null}
class IndexList {
    indexes: [class IndexModel {
        name: docs-example-sparse
        dimension: null
        metric: dotproduct
        host: docs-example-sparse-govk0nt.svc.aped-4627-b74a.pinecone.io
        deletionProtection: disabled
        tags: {environment=development}
        embed: null
        spec: class IndexModelSpec {
            pod: null
            serverless: class ServerlessSpec {
                cloud: aws
                region: us-east-1
                additionalProperties: null
            }
            additionalProperties: null
        }
        status: class IndexModelStatus {
            ready: true
            state: Ready
            additionalProperties: null
        }
        vectorType: sparse
        additionalProperties: null
    }, class IndexModel {
        name: docs-example-dense
        dimension: 1536
        metric: cosine
        host: docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io
        deletionProtection: disabled
        tags: {environment=development}
        embed: null
        spec: class IndexModelSpec {
            pod: null
            serverless: class ServerlessSpec {
                cloud: aws
                region: us-east-1
                additionalProperties: null
            }
            additionalProperties: null
        }
        status: class IndexModelStatus {
            ready: true
            state: Ready
            additionalProperties: null
        }
        vectorType: dense
        additionalProperties: null
    }]
    additionalProperties: null
}
```

```go Go theme={null}
index: {
  "name": "docs-example-sparse",
  "host": "docs-example-sparse-govk0nt.svc.aped-4627-b74a.pinecone.io",
  "metric": "dotproduct",
  "vector_type": "sparse",
  "deletion_protection": "disabled",
  "dimension": null,
  "spec": {
    "serverless": {
      "cloud": "aws",
      "region": "us-east-1"
    }
  },
  "status": {
    "ready": true,
    "state": "Ready"
  },
  "tags": {
    "environment": "development"
  }
}
index: {
  "name": "docs-example-dense",
  "host": "docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io",
  "metric": "cosine",
  "vector_type": "dense",
  "deletion_protection": "disabled",
  "dimension": 1536,
  "spec": {
    "serverless": {
      "cloud": "aws",
      "region": "us-east-1"
    }
  },
  "status": {
    "ready": true,
    "state": "Ready"
  },
  "tags": {
    "environment": "development"
  }
}
```

```json curl theme={null}
{
  "indexes": [
    {
      "name": "docs-example-sparse",
      "host": "docs-example-sparse-govk0nt.svc.aped-4627-b74a.pinecone.io",
      "status": {
        "ready": true,
        "state": "Ready"
      },
      "deployment": {
        "deployment_type": "managed",
        "region": "us-east-1",
        "cloud": "aws",
        "environment": "aped-4627-b74a"
      },
      "read_capacity": {
        "mode": "OnDemand",
        "status": {
          "state": "Ready",
          "current_shards": null,
          "current_replicas": null
        }
      },
      "schema": {
        "fields": {
          "sparse_embedding": {
            "type": "sparse_vector",
            "description": null
          }
        }
      },
      "tags": {
        "environment": "development"
      },
      "deletion_protection": "disabled"
    },
    {
      "name": "docs-example-dense",
      "host": "docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io",
      "status": {
        "ready": true,
        "state": "Ready"
      },
      "deployment": {
        "deployment_type": "managed",
        "region": "us-east-1",
        "cloud": "aws",
        "environment": "aped-4627-b74a"
      },
      "read_capacity": {
        "mode": "OnDemand",
        "status": {
          "state": "Ready",
          "current_shards": null,
          "current_replicas": null
        }
      },
      "schema": {
        "fields": {
          "chunk_text": {
            "type": "string",
            "description": null,
            "full_text_search": {
              "language": "en",
              "stemming": false,
              "stop_words": false
            }
          },
          "embedding": {
            "type": "dense_vector",
            "description": null,
            "dimension": 1536,
            "metric": "cosine"
          }
        }
      },
      "tags": {
        "environment": "development"
      },
      "deletion_protection": "disabled"
    }
  ]
}
```

With the Python SDK, you can use the `.names()` helper function to iterate over the index names in the `list_indexes()` response, for example:

```Python Python theme={null}
from pinecone.grpc import PineconeGRPC as Pinecone
from pinecone import ServerlessSpec

for index_name in pc.list_indexes().names:
    print(index_name)
```

## Describe an index

Use the [Describe an index](https://docs.pinecone.io/reference/api/latest/control-plane/describe_index.md) endpoint to get a complete description of a specific index:

```Python Python theme={null}
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.describe_index(name="docs-example")
```

```JavaScript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });

await pc.describeIndex('docs-example');
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;
import org.openapitools.db_control.client.model.*;

public class DescribeIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOURE_API_KEY").build();
        IndexModel indexModel = pc.describeIndex("docs-example");
        System.out.println(indexModel);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func prettifyStruct(obj interface{}) string {
    bytes, _ := json.MarshalIndent(obj, "", "  ")
    return string(bytes)
}

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    idx, err := pc.DescribeIndex(ctx, "docs-example")
    if err != nil {
        log.Fatalf("Failed to describe index \"%v\": %v", idx.Name, err)
    } else {
        fmt.Printf("index: %v\n", prettifyStruct(idx))
    }
}
```

```bash curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -i -X GET "https://api.pinecone.io/indexes/docs-example" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-Api-Version: 2026-07"
```

The response will look like this:

```Python Python theme={null}
{'deletion_protection': 'disabled',
 'dimension': 1536,
 'host': 'docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io',
 'metric': 'cosine',
 'name': 'docs-example-dense',
 'spec': {'serverless': {'cloud': 'aws', 'region': 'us-east-1'}},
 'status': {'ready': True, 'state': 'Ready'},
 'tags': {'environment': 'development'},
 'vector_type': 'dense'}
```

```javaScript JavaScript theme={null}
{
  name: 'docs-example-dense',
  dimension: 1536,
  metric: 'cosine',
  host: 'docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io',
  deletionProtection: 'disabled',
  tags: { environment: 'development', example: 'tag' },
  embed: undefined,
  spec: { pod: undefined, serverless: { cloud: 'aws', region: 'us-east-1' } },
  status: { ready: true, state: 'Ready' },
  vectorType: 'dense'
}
```

```java Java theme={null}
class IndexModel {
    name: docs-example-dense
    dimension: 1536
    metric: cosine
    host: docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io
    deletionProtection: disabled
    tags: {environment=development}
    embed: null
    spec: class IndexModelSpec {
        pod: null
        serverless: class ServerlessSpec {
            cloud: aws
            region: us-east-1
            additionalProperties: null
        }
        additionalProperties: null
    }
    status: class IndexModelStatus {
        ready: true
        state: Ready
        additionalProperties: null
    }
    vectorType: dense
    additionalProperties: null
}
```

```go Go theme={null}
index: {
  "name": "docs-example-dense",
  "host": "docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io",
  "metric": "cosine",
  "vector_type": "dense",
  "deletion_protection": "disabled",
  "dimension": 1536,
  "spec": {
    "serverless": {
      "cloud": "aws",
      "region": "us-east-1"
    }
  },
  "status": {
    "ready": true,
    "state": "Ready"
  },
  "tags": {
    "environment": "development"
  }
}
```

```json curl theme={null}
{
  "name": "docs-example-dense",
  "host": "docs-example-dense-govk0nt.svc.aped-4627-b74a.pinecone.io",
  "status": {
    "ready": true,
    "state": "Ready"
  },
  "deployment": {
    "deployment_type": "managed",
    "region": "us-east-1",
    "cloud": "aws",
    "environment": "aped-4627-b74a"
  },
  "read_capacity": {
    "mode": "OnDemand",
    "status": {
      "state": "Ready",
      "current_shards": null,
      "current_replicas": null
    }
  },
  "schema": {
    "fields": {
      "chunk_text": {
        "type": "string",
        "description": null,
        "full_text_search": {
          "language": "en",
          "stemming": false,
          "stop_words": false
        }
      },
      "embedding": {
        "type": "dense_vector",
        "description": null,
        "dimension": 1536,
        "metric": "cosine"
      }
    }
  },
  "tags": {
    "environment": "development"
  },
  "deletion_protection": "disabled"
}
```

> [!WARNING]
>
> **Do not target an index by name in production.**
>
> When you target an index by name for data operations such as `upsert` and `query`, the SDK gets the unique DNS host for the index using the `describe_index` operation. This is convenient for testing but should be avoided in production because `describe_index` uses a different API than data operations and therefore adds an additional network call and point of failure. Instead, you should get an index host once and cache it for reuse or specify the host directly.

## Delete an index

Use the [Delete an index](https://docs.pinecone.io/reference/api/latest/control-plane/delete_index.md) operation to delete an index and all of its associated resources.

```python Python theme={null}
# pip install pinecone
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.delete_index(name="docs-example")
```

```javascript JavaScript theme={null}
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone'

const pc = new Pinecone({
  apiKey: 'YOUR_API_KEY'
});

await pc.deleteIndex('docs-example');
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;

public class DeleteIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        pc.deleteIndex("docs-example");
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    indexName := "docs-example"

    err = pc.DeleteIndex(ctx, indexName)
    if err != nil {
        log.Fatalf("Failed to delete index: %v", err)
    } else {
        fmt.Println("Index \"%v\" deleted successfully", indexName)
    }
}
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -i -X DELETE "https://api.pinecone.io/indexes/docs-example" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "X-Pinecone-Api-Version: 2026-07"
```

If deletion protection is enabled on an index, requests to delete it will fail and return a `403 - FORBIDDEN` status with the following error:

```
Deletion protection is enabled for this index. Disable deletion protection before retrying.
```

Before you can delete such an index, you must first [disable deletion protection](https://docs.pinecone.io/guides/indexes/manage-indexes.md#configure-deletion-protection).

> [!TIP]
>
> You can delete an index using the [Pinecone console](https://app.pinecone.io/organizations/-/projects/-/indexes). For the index you want to delete, click the three dots to the right of the index name, then click **Delete**.

## Associate an embedding model

On a legacy integrated index, [integrated embedding](https://docs.pinecone.io/guides/indexes/indexing-overview.md#integrated-embedding) lets you upsert and search without extra steps for embedding data.

To configure an existing serverless index for an embedding model, use the [Configure an index](https://docs.pinecone.io/reference/api/latest/control-plane/configure_index.md) operation as follows:

* Set `embed.model` to one of [Pinecone's hosted embedding models](https://docs.pinecone.io/guides/indexes/index-configuration.md#embedding-models).
* Set `embed.field_map` to the name of the field in your source document that contains the data for embedding.

> [!WARNING]
>
> The `vector_type`, `metric`, and `dimension` of the index must be supported by the specified embedding model.

```python Python theme={null}
# pip install --upgrade pinecone
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.configure_index(
    name="docs-example",
    embed={
      "model":"llama-text-embed-v2",
      "field_map":{"text": "chunk_text"}
    }
)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });

await pc.configureIndex('docs-example', {
  embed: {
    model: 'llama-text-embed-v2',
    fieldMap: { text: 'chunk_text' },
  },
});
```

```json curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -s -X PATCH "https://api.pinecone.io/indexes/docs-example" \
    -H "Content-Type: application/json" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-Api-Version: 2025-10" \
    -d '{
      "embed": {
          "model": "llama-text-embed-v2",
          "field_map": {
              "text": "chunk_text"
          }
      }
  }'
```

## Configure deletion protection

> [!NOTE]
>
> This feature requires [Pinecone API version](https://docs.pinecone.io/reference/api/versioning.md) `2024-07`, [Python SDK](https://docs.pinecone.io/reference/sdks/python/overview.md) v5.0.0, [Node.js SDK](https://docs.pinecone.io/reference/sdks/node/overview.md) v3.0.0, [Java SDK](https://docs.pinecone.io/reference/sdks/java/overview.md) v2.0.0, or [Go SDK](https://docs.pinecone.io/reference/sdks/go/overview.md) v1.0.0 or later.

### Enable deletion protection

You can prevent an index and its data from accidental deleting when [creating a new index](https://docs.pinecone.io/guides/indexes/create-an-index.md) or after its been created. In both cases, you set the `deletion_protection` parameter to `enabled`.

> [!WARNING]
>
> Enabling deletion protection does *not* prevent [namespace deletions](https://docs.pinecone.io/guides/data/manage-namespaces.md#delete-a-namespace).

To enable deletion protection when creating a new index:

> [!NOTE]
>
> Document-schema creation is currently available through the Python, JavaScript, and Go SDKs and REST. The Java tab creates a legacy vector index. See [Create an index](https://docs.pinecone.io/guides/indexes/create-an-index.md).

```python Python theme={null}
# pip install pinecone
# Serverless index with a document schema
from pinecone import Pinecone, SchemaBuilder

pc = Pinecone(api_key="YOUR_API_KEY")

schema = (
    SchemaBuilder()
      .add_dense_vector_field(name="embedding", dimension=1536, metric="cosine")
      .build()
)

pc.indexes.create(
    name="docs-example",
    deployment={"deployment_type": "managed", "cloud": "aws", "region": "us-east-1"},
    schema=schema,
    deletion_protection="enabled"
)
```

```javascript JavaScript theme={null}
// npm install @pinecone-database/pinecone
// Serverless index with a document schema
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });

await pc.indexes.create({
  name: 'docs-example',
  deployment: {
    deploymentType: 'managed',
    cloud: 'aws',
    region: 'us-east-1',
  },
  schema: {
    fields: {
      embedding: {
        type: 'dense_vector',
        dimension: 1536,
        metric: 'cosine',
      },
    },
  },
  deletionProtection: 'enabled',
});
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;

// Serverless index
public class CreateServerlessIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        pc.createServerlessIndex("docs-example", "cosine", 1536, "aws", "us-east-1", "enabled", null);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    // Serverless index with a document schema
    deletionProtection := pinecone.DeletionProtectionEnabled
    idx, err := pc.CreateIndex(ctx, &pinecone.CreateIndexRequest{
        Name: "docs-example",
        Deployment: &pinecone.IndexDeployment{
            Managed: &pinecone.ManagedDeployment{
                Cloud:  pinecone.CloudAWS,
                Region: "us-east-1",
            },
        },
        Schema: pinecone.IndexSchema{
            Fields: map[string]pinecone.IndexSchemaField{
                "embedding": {
                    DenseVector: &pinecone.DenseVectorField{
                        Dimension: 1536,
                        Metric:    pinecone.IndexMetricCosine,
                    },
                },
            },
        },
        DeletionProtection: &deletionProtection,
    })
    if err != nil {
        log.Fatalf("Failed to create index: %v", err)
    }
    fmt.Printf("Successfully created index: %v", idx.Name)
}
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

# Serverless index
curl -s "https://api.pinecone.io/indexes" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "X-Pinecone-Api-Version: 2026-07" \
  -d '{
         "name": "docs-example",
         "deployment": {
            "deployment_type": "managed",
            "cloud": "aws",
            "region": "us-east-1"
         },
         "schema": {
            "fields": {
               "embedding": {
                  "type": "dense_vector",
                  "dimension": 1536,
                  "metric": "cosine"
               }
            }
         },
         "deletion_protection": "enabled"
      }'
```

To enable deletion protection when configuring an existing index:

```python Python theme={null}
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.configure_index(
   name="docs-example", 
   deletion_protection="enabled"
)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const client = new Pinecone({ apiKey: 'YOUR_API_KEY' });

await client.configureIndex('docs-example', { deletionProtection: 'enabled' });
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;

public class ConfigureIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        pc.configureServerlessIndex("docs-example", "enabled", null, null);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    idx, err := pc.ConfigureIndex(ctx, "docs-example", pinecone.ConfigureIndexParams{DeletionProtection: "enabled"})
  	if err != nil {
        log.Fatalf("Failed to configure index \"%v\": %v", idx.Name, err)
    } else {
        fmt.Printf("Successfully configured index \"%v\"", idx.Name)
    }
}
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -s -X PATCH "https://api.pinecone.io/indexes/docs-example-curl" \
    -H "Content-Type: application/json" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-Api-Version: 2026-07" \
    -d '{
        "deletion_protection": "enabled"
        }'
```

When deletion protection is enabled on an index, requests to delete the index fail and return a `403 - FORBIDDEN` status with the following error:

```
Deletion protection is enabled for this index. Disable deletion protection before retrying.
```

### Disable deletion protection

Before you can [delete an index](#delete-an-index) with deletion protection enabled, you must first disable deletion protection as follows:

```python Python theme={null}
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.configure_index(
   name="docs-example", 
   deletion_protection="disabled"
)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const client = new Pinecone({ apiKey: 'YOUR_API_KEY' });

await client.configureIndex('docs-example', { deletionProtection: 'disabled' });
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;

public class ConfigureIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        pc.configureServerlessIndex("docs-example", "disabled", null, null);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    idx, err := pc.ConfigureIndex(ctx, "docs-example", pinecone.ConfigureIndexParams{DeletionProtection: "disabled"})
  	if err != nil {
        log.Fatalf("Failed to configure index \"%v\": %v", idx.Name, err)
    } else {
        fmt.Printf("Successfully configured index \"%v\"", idx.Name)
    }
}
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -s -X PATCH "https://api.pinecone.io/indexes/docs-example-curl" \
    -H "Content-Type: application/json" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-Api-Version: 2026-07" \
    -d '{
        "deletion_protection": "disabled"
        }'
```

## Configure index tags

Tags are key-value pairs that you can use to categorize and identify the index.

### Add tags

To add tags to an index, use the `tags` parameter when [creating a new index](https://docs.pinecone.io/guides/indexes/create-an-index.md) or configuring an existing index.

To add tags when creating a new index:

> [!NOTE]
>
> Document-schema creation is currently available through the Python, JavaScript, and Go SDKs and REST. The Java tab creates a legacy vector index. See [Create an index](https://docs.pinecone.io/guides/indexes/create-an-index.md).

```python Python theme={null}
from pinecone import Pinecone, SchemaBuilder

pc = Pinecone(api_key="YOUR_API_KEY")

schema = (
    SchemaBuilder()
      .add_dense_vector_field(name="embedding", dimension=1536, metric="cosine")
      .build()
)

pc.indexes.create(
    name="docs-example",
    deployment={"deployment_type": "managed", "cloud": "aws", "region": "us-east-1"},
    schema=schema,
    deletion_protection="disabled",
    tags={
        "example": "tag",
        "environment": "development"
    }
)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });

await pc.indexes.create({
  name: 'docs-example',
  deployment: {
    deploymentType: 'managed',
    cloud: 'aws',
    region: 'us-east-1',
  },
  schema: {
    fields: {
      embedding: {
        type: 'dense_vector',
        dimension: 1536,
        metric: 'cosine',
      },
    },
  },
  deletionProtection: 'disabled',
  tags: {
    example: 'tag',
    environment: 'development',
  },
});
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;
import java.util.HashMap;

// Serverless index
public class CreateServerlessIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        HashMap<String, String> tags = new HashMap<>();
        tags.put("tag", "development");
        pc.createServerlessIndex("docs-example", "cosine", 1536, "aws", "us-east-1", "disabled", tags);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    // Serverless index with a document schema
    deletionProtection := pinecone.DeletionProtectionDisabled
    idx, err := pc.CreateIndex(ctx, &pinecone.CreateIndexRequest{
        Name: "docs-example",
        Deployment: &pinecone.IndexDeployment{
            Managed: &pinecone.ManagedDeployment{
                Cloud:  pinecone.CloudAWS,
                Region: "us-east-1",
            },
        },
        Schema: pinecone.IndexSchema{
            Fields: map[string]pinecone.IndexSchemaField{
                "embedding": {
                    DenseVector: &pinecone.DenseVectorField{
                        Dimension: 1536,
                        Metric:    pinecone.IndexMetricCosine,
                    },
                },
            },
        },
        DeletionProtection: &deletionProtection,
        Tags: &pinecone.IndexTags{
            "example":     "tag",
            "environment": "development",
        },
    })
    if err != nil {
        log.Fatalf("Failed to create index: %v", err)
    }
    fmt.Printf("Successfully created index: %v", idx.Name)
}
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

# Serverless index
curl -s "https://api.pinecone.io/indexes" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "X-Pinecone-Api-Version: 2026-07" \
  -d '{
         "name": "docs-example",
         "deployment": {
            "deployment_type": "managed",
            "cloud": "aws",
            "region": "us-east-1"
         },
         "schema": {
            "fields": {
               "embedding": {
                  "type": "dense_vector",
                  "dimension": 1536,
                  "metric": "cosine"
               }
            }
         },
         "tags": {
            "example": "tag",
            "environment": "development"
         },
         "deletion_protection": "disabled"
      }'
```

> [!TIP]
>
> You can add tags during index creation using the [Pinecone console](https://app.pinecone.io/organizations/-/projects/-/create-index/).

To add or update tags when configuring an existing index:

```python Python theme={null}
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.configure_index(
    name="docs-example", 
    tags={
        example: "tag", 
        environment: "development" 
    }
)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const client = new Pinecone({ apiKey: 'YOUR_API_KEY' });

await client.configureIndex('docs-example', { tags: { example: 'tag', environment: 'development' }});
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;
import java.util.HashMap;

public class ConfigureIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        HashMap<String, String> tags = new HashMap<>();
        tags.put("tag", "development");

        pc.configureServerlessIndex("docs-example", "enabled", tags, null);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    idx, err := pc.ConfigureIndex(ctx, 
        "docs-example", 
        pinecone.ConfigureIndexParams{
            Tags: pinecone.IndexTags{
			    "example": "tag",
                "environment": "development",
            },
        },
    )    
  	if err != nil {
        log.Fatalf("Failed to configure index \"%v\": %v", idx.Name, err)
    } else {
        fmt.Printf("Successfully configured index \"%v\"", idx.Name)
    }
}
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -s -X PATCH "https://api.pinecone.io/indexes/docs-example-curl" \
    -H "Content-Type: application/json" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-Api-Version: 2026-07" \
    -d '{
            "tags": {
                "example": "tag",
                "environment": "development"
            }
        }'
```

> [!TIP]
>
> You can add or update tags when configuring an existing index using the [Pinecone console](https://app.pinecone.io/organizations/-/projects/-/indexes). Find the index to edit and click the **ellipsis (...) menu > Add tags**.

### View tags

To view the tags of an index, [list all indexes](https://docs.pinecone.io/guides/indexes/manage-indexes.md) in a project or [get information about a specific index](https://docs.pinecone.io/guides/indexes/manage-indexes.md).

### Remove tags

To remove a tag from an index, [configure the index](https://docs.pinecone.io/reference/api/latest/control-plane/configure_index.md) and use the `tags` parameter to send the tag key with an empty value (`""`).

The following example removes the `example: tag` tag from `docs-example`:

```python Python theme={null}
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.configure_index(
    name="docs-example", 
    tags={"example": ""}
)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const client = new Pinecone({ apiKey: 'YOUR_API_KEY' });

await client.configureIndex('docs-example', { tags: { example: '' }});
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;
import java.util.HashMap;

public class ConfigureIndexExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
        HashMap<String, String> tags = new HashMap<>();
        tags.put("example", "");

        pc.configureServerlessIndex("docs-example", "enabled", tags, null);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    idx, err := pc.ConfigureIndex(ctx, 
        "docs-example", 
        pinecone.ConfigureIndexParams{
            Tags: pinecone.IndexTags{
			    "example": "",
            },
        },
    )    
  	if err != nil {
        log.Fatalf("Failed to configure index \"%v\": %v", idx.Name, err)
    } else {
        fmt.Printf("Successfully configured index \"%v\"", idx.Name)
    }
}
```

```shell curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"

curl -s -X PATCH "https://api.pinecone.io/indexes/docs-example-curl" \
    -H "Content-Type: application/json" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-Api-Version: 2026-07" \
    -d '{
            "tags": {
                "example": ""
            }
        }'
```

> [!TIP]
>
> You can remove tags from an index using the [Pinecone console](https://app.pinecone.io/organizations/-/projects/-/indexes). Find the index to edit and click the **ellipsis (...) menu > \_\_ tags**.

## List backups for an index

Serverless indexes can be [backed up](https://docs.pinecone.io/guides/indexes/back-up-an-index.md). You can [list all backups for a specific index](https://docs.pinecone.io/reference/api/latest/control-plane/list_index_backups.md), as in the following example:

```python Python theme={null}
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

index_backups = pc.list_backups(index_name="docs-example")

print(index_backups)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })

const indexBackups = await pc.listBackups({ indexName: 'docs-example' });

console.log(indexBackups);
```

```java Java theme={null}
import io.pinecone.clients.Pinecone;
import org.openapitools.db_control.client.ApiException;
import org.openapitools.db_control.client.model.*;

public class CreateBackup {
    public static void main(String[] args) throws ApiException {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();

        String indexName = "docs-example";
        BackupList indexBackupList = pc.listIndexBackups(indexName);

        System.out.println(indexBackupList);
    }
}
```

```go Go theme={null}
package main

import (
	"context"
	"encoding/json"
	"fmt"
	"log"

	"github.com/pinecone-io/go-pinecone/v7/pinecone"
)

func prettifyStruct(obj interface{}) string {
	bytes, _ := json.MarshalIndent(obj, "", "  ")
	return string(bytes)
}

func main() {
	ctx := context.Background()

	pc, err := pinecone.NewClient(pinecone.NewClientParams{
		ApiKey: "YOUR_API_KEY",
	})
	if err != nil {
		log.Fatalf("Failed to create Client: %v", err)
	}

	indexName := "docs-example"
	limit := 2
	indexBackups, err := pc.ListBackups(ctx, &pinecone.ListBackupsParams{
		Limit: &limit,
		IndexName: &indexName,
	})
	if err != nil {
		log.Fatalf("Failed to list backups: %v", err)
	}
	fmt.Printf(prettifyStruct(indexBackups))
}
```

```bash curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_NAME="docs-example"

curl -X GET "https://api.pinecone.io/indexes/$INDEX_NAME/backups" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-Api-Version: 2026-07" \
    -H "accept: application/json"
```

The example returns a response like the following:

```python Python theme={null}
[{
    "backup_id": "8c85e612-ed1c-4f97-9f8c-8194e07bcf71",
    "source_index_name": "docs-example",
    "source_index_id": "f73b36c9-faf5-4a2c-b1d6-4013d8b1cc74",
    "status": "Ready",
    "cloud": "aws",
    "region": "us-east-1",
    "tags": {},
    "name": "example-backup",
    "description": "Monthly backup of production index",
    "dimension": 1024,
    "record_count": 98,
    "namespace_count": 3,
    "size_bytes": 1069169,
    "created_at": "2025-05-15T00:52:10.809305882Z"
}]
```

```javascript JavaScript theme={null}
{
  data: [
    {
      backupId: '8c85e612-ed1c-4f97-9f8c-8194e07bcf71',
      sourceIndexName: 'docs-example',
      sourceIndexId: 'f73b36c9-faf5-4a2c-b1d6-4013d8b1cc74',
      name: 'example-backup',
      description: 'Monthly backup of production index',
      status: 'Ready',
      cloud: 'aws',
      region: 'us-east-1',
      dimension: 1024,
      metric: undefined,
      recordCount: 98,
      namespaceCount: 3,
      sizeBytes: 1069169,
      tags: {},
      createdAt: '2025-05-14T16:37:25.625540Z'
    }
  ],
  pagination: undefined
}
```

```java Java theme={null}
class BackupList {
    data: [class BackupModel {
        backupId: 8c85e612-ed1c-4f97-9f8c-8194e07bcf71
        sourceIndexName: docs-example
        sourceIndexId: f73b36c9-faf5-4a2c-b1d6-4013d8b1cc74
        name: example-backup
        description: Monthly backup of production index
        status: Initializing
        cloud: aws
        region: us-east-1
        dimension: null
        metric: null
        recordCount: null
        namespaceCount: null
        sizeBytes: null
        tags: {}
        createdAt: 2025-05-16T19:46:26.248428Z
        additionalProperties: null
    }]
    pagination: null
    additionalProperties: null
}
```

```go Go theme={null}
{
  "data": [
    {
      "backup_id": "bf2cda5d-b233-4a0a-aae9-b592780ad3ff",
      "cloud": "aws",
      "created_at": "2025-05-16T18:01:51.531129Z",
      "description": "Monthly backup of production index",
      "dimension": 0,
      "name": "example-backup",
      "namespace_count": 1,
      "record_count": 96,
      "region": "us-east-1",
      "size_bytes": 86393,
      "source_index_id": "bcb5b3c9-903e-4cb6-8b37-a6072aeb874f",
      "source_index_name": "docs-example",
      "status": "Ready",
      "tags": {}
    },
    {
      "backup_id": "e12269b0-a29b-4af0-9729-c7771dec03e3",
      "cloud": "aws",
      "created_at": "2025-05-14T17:00:45.803146Z",
      "dimension": 0,
      "name": "example-backup2",
      "namespace_count": 1,
      "record_count": 96,
      "region": "us-east-1",
      "size_bytes": 86393,
      "source_index_id": "bcb5b3c9-903e-4cb6-8b37-a6072aeb874f",
      "source_index_name": "docs-example",
      "status": "Ready"
    }
  ],
  "pagination": {
    "next": "eyJsaW1pdCI6Miwib2Zmc2V0IjoyfQ=="
  }
}
```

```json curl theme={null}
{
  "data":
  [
    {
      "backup_id":"9947520e-d5a1-4418-a78d-9f464c9969da",
      "source_index_id":"8433941a-dae7-43b5-ac2c-d3dab4a56b2b",
      "source_index_name":"docs-example",
      "tags":{},
      "name":"example-backup",
      "description":"Monthly backup of production index",
      "status":"Pending",
      "cloud":"aws",
      "region":"us-east-1",
      "schema":{
        "fields":{
          "embedding":{
            "type":"dense_vector",
            "description":null,
            "dimension":1024,
            "metric":"cosine"
          }
        }
      },
      "record_count":98,
      "namespace_count":3,
      "size_bytes":1069169,
      "created_at":"2025-03-11T18:29:50.549505Z"
      }
    ],
  "pagination":null
}
```

> [!TIP]
>
> You can view the backups for a specific index from either the [Backups](https://app.pinecone.io/organizations/-/projects/-/backups) tab or the [Indexes](https://app.pinecone.io/organizations/-/projects/-/indexes) tab in the Pinecone console.
