PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_SERVICE_ACCOUNT_ID="f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
curl -X POST "https://api.pinecone.io/admin/service-accounts/$PINECONE_SERVICE_ACCOUNT_ID/rotate-secret" \
-H "X-Pinecone-Api-Version: 2026-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN"
{
"service_account": {
"id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "My Service Account",
"client_id": "l3Ow0CmFyc4jOONcwiKUCRqQKN0tiCAn",
"created_at": "2026-04-10T15:23:00Z",
"updated_at": "2026-04-10T15:23:00Z"
},
"client_secret": "8p-kkC23XOWvkCosKq-BOn3G74qp__rBcDMxc82iB4gfzRvuhSCRBKM7C5Q7TAzj"
}
Rotate a service account's OAuth client secret
Rotate the OAuth client_secret for a service account. The previous secret and tokens minted from it are revoked within a few seconds. The new secret is returned only in this response.
Repeating the request may rotate again and invalidate the previous new secret.
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_SERVICE_ACCOUNT_ID="f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
curl -X POST "https://api.pinecone.io/admin/service-accounts/$PINECONE_SERVICE_ACCOUNT_ID/rotate-secret" \
-H "X-Pinecone-Api-Version: 2026-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN"
{
"service_account": {
"id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "My Service Account",
"client_id": "l3Ow0CmFyc4jOONcwiKUCRqQKN0tiCAn",
"created_at": "2026-04-10T15:23:00Z",
"updated_at": "2026-04-10T15:23:00Z"
},
"client_secret": "8p-kkC23XOWvkCosKq-BOn3G74qp__rBcDMxc82iB4gfzRvuhSCRBKM7C5Q7TAzj"
}
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_SERVICE_ACCOUNT_ID="f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
curl -X POST "https://api.pinecone.io/admin/service-accounts/$PINECONE_SERVICE_ACCOUNT_ID/rotate-secret" \
-H "X-Pinecone-Api-Version: 2026-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN"
{
"service_account": {
"id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "My Service Account",
"client_id": "l3Ow0CmFyc4jOONcwiKUCRqQKN0tiCAn",
"created_at": "2026-04-10T15:23:00Z",
"updated_at": "2026-04-10T15:23:00Z"
},
"client_secret": "8p-kkC23XOWvkCosKq-BOn3G74qp__rBcDMxc82iB4gfzRvuhSCRBKM7C5Q7TAzj"
}
Authorizations
An access token must be provided in the Authorization header using the Bearer scheme.
Headers
Required date-based version header
Path Parameters
The unique identifier of the service account.
Response
Secret rotated successfully. The new client_secret is in the response body and is returned exactly once.
A service account with a newly issued OAuth client_secret. The secret is returned only once and cannot be retrieved later.
A service account. The OAuth client_secret is not included.
Show child attributes
Show child attributes
{
"client_id": "l3Ow0CmFyc4jOONcwiKUCRqQKN0tiCAn",
"created_at": "2026-04-10T15:23:00.000Z",
"id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "My Service Account",
"updated_at": "2026-04-12T09:11:00.000Z"
}
The OAuth client secret. Returned exactly once. Treat this value as a credential — store it securely and never log it.
Was this page helpful?