Method: projects.serviceAccounts.create

Stay organized with collections Save and categorize content based on your preferences.

Creates a ServiceAccount.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. The resource name of the project associated with the service accounts, such as projects/my-project-123.

Authorization requires the following IAM permission on the specified resource name:

  • iam.serviceAccounts.create

Request body

The request body contains data with the following structure:

JSON representation
  "accountId": string,
  "serviceAccount": {
    object (ServiceAccount)


Required. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression [a-z]([-a-z0-9]*[a-z0-9]) to comply with RFC1035.


object (ServiceAccount)

The ServiceAccount resource to create. Currently, only the following values are user assignable: displayName and description.

Response body

If successful, the response body contains a newly created instance of ServiceAccount.

Authorization Scopes

Requires one of the following OAuth scopes:


For more information, see the Authentication Overview.