PATCH
/
admin
/
api-keys
/
{api_key_id}
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-04" \
	-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"
}
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-04" \
	-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"
}

Authorizations

Authorization
string
header
required

An access token must be provided in the Authorization header using the Bearer scheme.

Path Parameters

api_key_id
string<uuid>
required

API key ID

Body

application/json

Updated name and roles for the API key.

name
string

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 - 80
Example:

"devkey"

roles
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.

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.

key
object
required

The details of an API key, without the secret.

value
string
required

The value to use as an API key. New keys will have the format "pckey_<public-label>_<unique-key>". The entire string should be used when authenticating.