v1

latestOpenAPI 3.0.3Apache 2.02026-07-1372170520.1 KB
Namespace Operations

Create a namespace

Create a namespace in a serverless index.

For guidance and examples, see Manage namespaces.

Note: This operation is not supported for pod-based indexes.

post/namespaces

Headers

X-Pinecone-Api-Versionstring required

Required date-based version header

Request body

namestring required

The name of the namespace.

Example request

{
  "name": "example-namespace",
  "schema": {
    "fields": {
      "description": {
        "filterable": true
      },
      "genre": {
        "filterable": true
      },
      "year": {
        "filterable": true
      }
    }
  }
}

Response

A successful response.

namestring

The name of the namespace.

record_countinteger

The total amount of records within the namespace.

Example response

{
  "name": "example-namespace",
  "record_count": 20000,
  "schema": {
    "fields": {
      "description": {
        "filterable": true
      },
      "genre": {
        "filterable": true
      },
      "year": {
        "filterable": true
      }
    }
  },
  "indexed_fields": {
    "fields": [
      "genre",
      "year",
      "author"
    ]
  }
}