/admin/service-accountsCreate a service accountCreate a service account with optional initial role bindings; the client secret is returned only once.
Parameters
X-Pinecone-Api-VersionstringheaderrequiredRequired date-based version header
Request body
requiredThe service account to create. Repeating this request may create duplicate service accounts.
application/json
namestringrequiredThe human-readable name of the service account.
role_bindingsarray of objectOptional 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.
Show child attributes
Show array items
A role to grant to the principal being created. `resource_type` selects the binding scope and acts as the tag for the entry. For `organization` scope, omit `resource_id`; the binding applies to the principal's organization (inferred from the request context). For `project` scope, `resource_id` is required and must be the project UUID.
resource_idstringProject UUID. Required when `resource_type` is `project`; omit for `organization` scope.
resource_typestringrequiredThe kind of resource scope a role binding applies to. Possible values: `organization`, `project`.
rolestringrequiredA role assigned to a principal at a resource scope.
{
"name": "ci-prod",
"role_bindings": [
{
"resource_id": "a2f7dddb-1597-4eff-9f71-535fde243f58",
"resource_type": "project",
"role": "DataPlaneEditor"
}
]
}Responses
A service account with a newly issued OAuth `client_secret`. The secret is returned only once and cannot be retrieved later.
client_secretstringrequiredThe OAuth client secret. Returned exactly once. Treat this value as a credential — store it securely and never log it.
service_accountobjectrequiredA service account. The OAuth `client_secret` is not included.
Show child attributes
client_idstringrequiredThe OAuth client ID used by the service account to obtain access tokens. Used only for OAuth token exchange.
created_atstring · date-timerequiredThe date and time the service account was created.
idstring · uuidrequiredThe unique identifier for the service account. Use this as the path parameter on `/admin/service-accounts/{service_account_id}` endpoints and as the `principal_id` when querying or creating role bindings.
namestringrequiredA short human-readable label, set by the caller at creation time.
updated_atstring · date-timerequiredThe date and time of the service account's most recent metadata update.
{
"client_secret": "",
"service_account": {
"client_id": "l3Ow0CmFyc4jOONcwiKUCRqQKN0tiCAn",
"created_at": "2026-04-10T15:23:00Z",
"id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "My Service Account",
"updated_at": "2026-04-10T15:23:00Z"
}
}The response shape used for all error responses.
errorobjectrequiredDetailed information about the error that occurred.
Show child attributes
codestringrequiredThe error code. Possible values: `OK`, `UNKNOWN`, `INVALID_ARGUMENT`, `DEADLINE_EXCEEDED`, `QUOTA_EXCEEDED`, `NOT_FOUND`, `ALREADY_EXISTS`, `PERMISSION_DENIED`, `UNAUTHENTICATED`, `RESOURCE_EXHAUSTED`, `FAILED_PRECONDITION`, `ABORTED`, `OUT_OF_RANGE`, `UNIMPLEMENTED`, `INTERNAL`, `UNAVAILABLE`, `DATA_LOSS`, `FORBIDDEN`, or `UNPROCESSABLE_ENTITY`.
detailsobjectAdditional information about the error. This field is not guaranteed to be present.
messagestringrequiredstatusintegerrequiredThe HTTP status code of the error.
{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Bad request. The request body included invalid request parameters."
},
"status": 400
}The response shape used for all error responses.
errorobjectrequiredDetailed information about the error that occurred.
Show child attributes
codestringrequiredThe error code. Possible values: `OK`, `UNKNOWN`, `INVALID_ARGUMENT`, `DEADLINE_EXCEEDED`, `QUOTA_EXCEEDED`, `NOT_FOUND`, `ALREADY_EXISTS`, `PERMISSION_DENIED`, `UNAUTHENTICATED`, `RESOURCE_EXHAUSTED`, `FAILED_PRECONDITION`, `ABORTED`, `OUT_OF_RANGE`, `UNIMPLEMENTED`, `INTERNAL`, `UNAVAILABLE`, `DATA_LOSS`, `FORBIDDEN`, or `UNPROCESSABLE_ENTITY`.
detailsobjectAdditional information about the error. This field is not guaranteed to be present.
messagestringrequiredstatusintegerrequiredThe HTTP status code of the error.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
},
"status": 401
}The response shape used for all error responses.
errorobjectrequiredDetailed information about the error that occurred.
Show child attributes
codestringrequiredThe error code. Possible values: `OK`, `UNKNOWN`, `INVALID_ARGUMENT`, `DEADLINE_EXCEEDED`, `QUOTA_EXCEEDED`, `NOT_FOUND`, `ALREADY_EXISTS`, `PERMISSION_DENIED`, `UNAUTHENTICATED`, `RESOURCE_EXHAUSTED`, `FAILED_PRECONDITION`, `ABORTED`, `OUT_OF_RANGE`, `UNIMPLEMENTED`, `INTERNAL`, `UNAVAILABLE`, `DATA_LOSS`, `FORBIDDEN`, or `UNPROCESSABLE_ENTITY`.
detailsobjectAdditional information about the error. This field is not guaranteed to be present.
messagestringrequiredstatusintegerrequiredThe HTTP status code of the error.
{
"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
}The response shape used for all error responses.
errorobjectrequiredDetailed information about the error that occurred.
Show child attributes
codestringrequiredThe error code. Possible values: `OK`, `UNKNOWN`, `INVALID_ARGUMENT`, `DEADLINE_EXCEEDED`, `QUOTA_EXCEEDED`, `NOT_FOUND`, `ALREADY_EXISTS`, `PERMISSION_DENIED`, `UNAUTHENTICATED`, `RESOURCE_EXHAUSTED`, `FAILED_PRECONDITION`, `ABORTED`, `OUT_OF_RANGE`, `UNIMPLEMENTED`, `INTERNAL`, `UNAVAILABLE`, `DATA_LOSS`, `FORBIDDEN`, or `UNPROCESSABLE_ENTITY`.
detailsobjectAdditional information about the error. This field is not guaranteed to be present.
messagestringrequiredstatusintegerrequiredThe HTTP status code of the error.
{
"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
}The response shape used for all error responses.
errorobjectrequiredDetailed information about the error that occurred.
Show child attributes
codestringrequiredThe error code. Possible values: `OK`, `UNKNOWN`, `INVALID_ARGUMENT`, `DEADLINE_EXCEEDED`, `QUOTA_EXCEEDED`, `NOT_FOUND`, `ALREADY_EXISTS`, `PERMISSION_DENIED`, `UNAUTHENTICATED`, `RESOURCE_EXHAUSTED`, `FAILED_PRECONDITION`, `ABORTED`, `OUT_OF_RANGE`, `UNIMPLEMENTED`, `INTERNAL`, `UNAVAILABLE`, `DATA_LOSS`, `FORBIDDEN`, or `UNPROCESSABLE_ENTITY`.
detailsobjectAdditional information about the error. This field is not guaranteed to be present.
messagestringrequiredstatusintegerrequiredThe HTTP status code of the error.
{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}