Creates a ServiceAccount
.
HTTP request
POST https://iam.googleapis.com/v1/{name=projects/*}/serviceAccounts
The URL uses gRPC Transcoding syntax.
Path parameters
name
string
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 (
|
| Fields | |
|---|---|
accountId
|
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 |
serviceAccount
|
The |
Response body
If successful, the response body contains a newly created instance of ServiceAccount
.
Authorization scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/iam -
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .

