curl --request POST \
--url https://api.pinecone.io/admin/service-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>' \
--data '
{
"name": "ci-prod",
"role_bindings": [
{
"resource_id": "a2f7dddb-1597-4eff-9f71-535fde243f58",
"resource_type": "project",
"role": "DataPlaneEditor"
}
]
}
'{
"client_secret": "8p-kkC23XOWvkCosKq-BOn3G74qp__rBcDMxc82iB4gfzRvuhSCRBKM7C5Q7TAzj",
"service_account": {
"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-10T15:23:00.000Z"
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Bad request. The request body included invalid request parameters."
},
"status": 400
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
},
"status": 401
}{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
},
"status": 429
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
},
"status": 429
}Create a service account
Create a service account with optional initial role bindings; the client secret is returned only once.
curl --request POST \
--url https://api.pinecone.io/admin/service-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>' \
--data '
{
"name": "ci-prod",
"role_bindings": [
{
"resource_id": "a2f7dddb-1597-4eff-9f71-535fde243f58",
"resource_type": "project",
"role": "DataPlaneEditor"
}
]
}
'{
"client_secret": "8p-kkC23XOWvkCosKq-BOn3G74qp__rBcDMxc82iB4gfzRvuhSCRBKM7C5Q7TAzj",
"service_account": {
"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-10T15:23:00.000Z"
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Bad request. The request body included invalid request parameters."
},
"status": 400
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
},
"status": 401
}{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
},
"status": 429
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
},
"status": 429
}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. Repeating this request may create duplicate service accounts.
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. A service account may be granted any organization- or project-scoped role. Not returned in the response.
100Show child attributes
Show child attributes
Response
Service account created. Role bindings are not returned here; use GET /admin/role-bindings to list them.
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?