# To get the unique host for an index,
# see https://docs.pinecone.io/guides/manage-data/target-an-index
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"
curl "https://$INDEX_HOST/namespaces" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-API-Version: 2025-10" \
-d '{
"name": "example-namespace",
"schema": {
"fields": {
"document_id": {"filterable": true},
"document_title": {"filterable": true},
"chunk_number": {"filterable": true},
"document_url": {"filterable": true},
"created_at": {"filterable": true}
}
}
}'
{
"name": "example-namespace",
"record_count": "0",
"schema": {
"fields": {
"document_title": {
"filterable": true
},
"document_url": {
"filterable": true
},
"chunk_number": {
"filterable": true
},
"document_id": {
"filterable": true
},
"created_at": {
"filterable": true
}
}
}
}
Create a namespace in a serverless index.
For guidance and examples, see Manage namespaces.
Note: This operation is not supported for pod-based indexes.
# To get the unique host for an index,
# see https://docs.pinecone.io/guides/manage-data/target-an-index
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"
curl "https://$INDEX_HOST/namespaces" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-API-Version: 2025-10" \
-d '{
"name": "example-namespace",
"schema": {
"fields": {
"document_id": {"filterable": true},
"document_title": {"filterable": true},
"chunk_number": {"filterable": true},
"document_url": {"filterable": true},
"created_at": {"filterable": true}
}
}
}'
{
"name": "example-namespace",
"record_count": "0",
"schema": {
"fields": {
"document_title": {
"filterable": true
},
"document_url": {
"filterable": true
},
"chunk_number": {
"filterable": true
},
"document_id": {
"filterable": true
},
"created_at": {
"filterable": true
}
}
}
}
# To get the unique host for an index,
# see https://docs.pinecone.io/guides/manage-data/target-an-index
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"
curl "https://$INDEX_HOST/namespaces" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-API-Version: 2025-10" \
-d '{
"name": "example-namespace",
"schema": {
"fields": {
"document_id": {"filterable": true},
"document_title": {"filterable": true},
"chunk_number": {"filterable": true},
"document_url": {"filterable": true},
"created_at": {"filterable": true}
}
}
}'
{
"name": "example-namespace",
"record_count": "0",
"schema": {
"fields": {
"document_title": {
"filterable": true
},
"document_url": {
"filterable": true
},
"chunk_number": {
"filterable": true
},
"document_id": {
"filterable": true
},
"created_at": {
"filterable": true
}
}
}
}
A request for creating a namespace with the specified namespace name.
A successful response.
A description of a namespace, including the name and record count.
Was this page helpful?