Update an API key
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_API_KEY_ID="YOUR_API_KEY_ID"
curl -X PATCH "https://api.pinecone.io/admin/api-keys/$PINECONE_API_KEY_ID" \
-H "X-Pinecone-Api-Version: 2025-10" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "New API key name",
"roles": ["ProjectEditor"]
}'{
"key": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "New API key name",
"project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": [
"ProjectEditor"
]
},
"value": "string"
}PATCH
/admin/api-keys/{api_key_id}Update an API key
2 parameters
- X-Pinecone-Api-Versionstringheaderrequired
Required date-based version header
- api_key_idstringpathrequired
API key ID
curl --request PATCH \
--url https://api.pinecone.io/admin/api-keys/{api_key_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "devkey",
"roles": [
"ProjectEditor"
]
}'{
"id": "<string>",
"name": "<string>",
"project_id": "<string>",
"roles": [
"ProjectEditor"
]
}Authorizations
Section titled “Authorizations”Authorization(header, string, required) — Bearer authentication header of the formBearer <token>.
Path Parameters
Section titled “Path Parameters”api_key_id(path, string, required) — API key ID
Headers
Section titled “Headers”X-Pinecone-Api-Version(header, string, required) — Required date-based version header
name(body, string) — A new name for the API key. The name must be 1-80 characters long. If omitted, the name will not be updated.roles(body, string[]) — 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.
Response
Section titled “Response”200— API key updated successfully.400— Bad request. The request body included invalid request parameters.401— Unauthorized. Possible causes: Invalid API key.403— Forbidden500— Internal server error.4XX— Unexpected error on request.