PINECONE_API_KEY_ID="62b0dbfe-3489-4b79-b850-34d911527c88"
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
curl -X PATCH "https://api.pinecone.io/admin/api-keys/$PINECONE_API_KEY_ID" \
-H "X-Pinecone-Api-Version: 2025-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "new-api-key-name",
"roles": ["ProjectEditor"]
}'
{
"id": "62b0dbfe-3489-4b79-b850-34d911527c88",
"name": "new-api-key-name",
"project_id": "32c8235a-5220-4a80-a9f1-69c24109e6f2",
"roles": [
"ProjectEditor"
],
"created_at": "2025-10-22T19:27:21.202955Z"
}
API keys
Update an API key
Update the name and roles of an API key.
PATCH
/
admin
/
api-keys
/
{api_key_id}
PINECONE_API_KEY_ID="62b0dbfe-3489-4b79-b850-34d911527c88"
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
curl -X PATCH "https://api.pinecone.io/admin/api-keys/$PINECONE_API_KEY_ID" \
-H "X-Pinecone-Api-Version: 2025-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "new-api-key-name",
"roles": ["ProjectEditor"]
}'
{
"id": "62b0dbfe-3489-4b79-b850-34d911527c88",
"name": "new-api-key-name",
"project_id": "32c8235a-5220-4a80-a9f1-69c24109e6f2",
"roles": [
"ProjectEditor"
],
"created_at": "2025-10-22T19:27:21.202955Z"
}
PINECONE_API_KEY_ID="62b0dbfe-3489-4b79-b850-34d911527c88"
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
curl -X PATCH "https://api.pinecone.io/admin/api-keys/$PINECONE_API_KEY_ID" \
-H "X-Pinecone-Api-Version: 2025-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "new-api-key-name",
"roles": ["ProjectEditor"]
}'
{
"id": "62b0dbfe-3489-4b79-b850-34d911527c88",
"name": "new-api-key-name",
"project_id": "32c8235a-5220-4a80-a9f1-69c24109e6f2",
"roles": [
"ProjectEditor"
],
"created_at": "2025-10-22T19:27:21.202955Z"
}
Authorizations
An access token must be provided in the Authorization header using the Bearer scheme.
Path Parameters
API key ID
Body
application/json
Updated name and roles for the API key.
A new name for the API key. The name must be 1-80 characters long. If omitted, the name will not be updated.
Required string length:
1 - 80Example:
"devkey"
A new set of roles for the API key. Existing roles will be removed if not included. If this field is omitted, the roles will not be updated.
A role that can be assigned to an API key.
Possible values: ProjectEditor, ProjectViewer, ControlPlaneEditor, ControlPlaneViewer, DataPlaneEditor, or DataPlaneViewer.
Response
API key created successfully.
The details of an API key, including the secret. Only returned on API key creation.
Was this page helpful?
⌘I