PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
curl "https://api.pinecone.io/admin/service-accounts" \
-H "X-Pinecone-Api-Version: 2026-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "ci-prod",
"role_bindings": [
{
"resource_type": "project",
"resource_id": "a2f7dddb-1597-4eff-9f71-535fde243f58",
"role": "DataPlaneEditor"
}
]
}'
{
"service_account": {
"id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "ci-prod",
"client_id": "l3Ow0CmFyc4jOONcwiKUCRqQKN0tiCAn",
"created_at": "2026-04-10T15:23:00Z",
"updated_at": "2026-04-10T15:23:00Z"
},
"client_secret": "8p-kkC23XOWvkCosKq-BOn3G74qp__rBcDMxc82iB4gfzRvuhSCRBKM7C5Q7TAzj"
}
Create a service account
Create a service account with optional initial role bindings. The client_secret in the response is shown only once; store it securely.
Grant roles with role_bindings: organization-scoped bindings omit resource_id, while project-scoped bindings include the project resource_id. Service accounts may receive any organization- or project-scoped role (see Role). Bindings are not returned in the response.
Repeating the same request may create duplicate service accounts.
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
curl "https://api.pinecone.io/admin/service-accounts" \
-H "X-Pinecone-Api-Version: 2026-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "ci-prod",
"role_bindings": [
{
"resource_type": "project",
"resource_id": "a2f7dddb-1597-4eff-9f71-535fde243f58",
"role": "DataPlaneEditor"
}
]
}'
{
"service_account": {
"id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "ci-prod",
"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"
curl "https://api.pinecone.io/admin/service-accounts" \
-H "X-Pinecone-Api-Version: 2026-04" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "ci-prod",
"role_bindings": [
{
"resource_type": "project",
"resource_id": "a2f7dddb-1597-4eff-9f71-535fde243f58",
"role": "DataPlaneEditor"
}
]
}'
{
"service_account": {
"id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "ci-prod",
"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
Body
The service account to create.
The human-readable name of the service account.
1 - 80"ci-prod"
Optional initial role bindings. Omitting the field or passing an empty array creates the service account with no role bindings; roles can be added later via the role binding endpoints. Not returned in the response.
100Show child attributes
Show child attributes
Response
Service account created.
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?