Projects

Create project service account

Creates a new service account in the project. By default, this also returns an unredacted API key for the service account.

post/organization/projects/{project_id}/service_accounts

Path parameters

project_idstring required

The ID of the project.

Request body

namestring required

The name of the service account being created.

create_service_account_onlyboolean nullable

Create the service account without default roles or an API key.

expires_in_secondsinteger nullable

Number of seconds until the initial API key expires. If omitted or null, the key does not expire unless the effective organization or project policy requires an expiration. When a policy sets a maximum lifetime, this value must be provided and must not exceed that limit. A non-null value cannot be used when create_service_account_only is true.

Response

Project service account created successfully.

object'organization.project.service_account' required
idstring required
namestring required
role'member' | 'none' required

Service accounts created with default project membership have role member. Accounts created with create_service_account_only have role none.

created_atinteger required

Changes