Skip to main content
POST
/
v1
/
users
/
{user}
:updateEmail
cURL
curl --request POST \
  --url https://api.example.com/v1/users/{user}:updateEmail \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "email": "<string>"
}
'
{
  "name": "<string>",
  "state": "STATE_UNSPECIFIED",
  "email": "<string>",
  "title": "<string>",
  "userType": "USER_TYPE_UNSPECIFIED",
  "mfaEnabled": true,
  "tempOtpSecret": "<string>",
  "tempRecoveryCodes": [
    "<string>"
  ],
  "tempOtpSecretCreatedTime": "2023-11-07T05:31:56Z",
  "phone": "<string>",
  "profile": {
    "lastLoginTime": "2023-11-07T05:31:56Z",
    "lastChangePasswordTime": "2023-11-07T05:31:56Z",
    "source": "<string>"
  },
  "groups": [
    "<string>"
  ],
  "workloadIdentityConfig": {
    "providerType": "PROVIDER_TYPE_UNSPECIFIED",
    "issuerUrl": "<string>",
    "allowedAudiences": [
      "<string>"
    ],
    "subjectPattern": "<string>"
  }
}

Path Parameters

user
string
required

The user id.

Body

application/json
name
string
required

The name of the user whose email to update. Format: users/{email} Note: This is the current (old) email address. The new email is specified in the 'email' field.

email
string
required

The new email address.

Response

OK

name
string

The name of the user. Format: users/{email}

state
enum<string>

The lifecycle state of the user account.

Available options:
STATE_UNSPECIFIED,
ACTIVE,
DELETED
email
string

The email address of the user, used for login and notifications.

title
string

The display title or full name of the user.

userType
enum<string>

The type of user account.

Available options:
USER_TYPE_UNSPECIFIED,
USER,
SYSTEM_BOT,
SERVICE_ACCOUNT,
WORKLOAD_IDENTITY
mfaEnabled
boolean

The mfa_enabled flag means if the user has enabled MFA.

tempOtpSecret
string

Temporary OTP secret used during MFA setup and regeneration.

tempRecoveryCodes
string[]

Temporary recovery codes used during MFA setup and regeneration.

tempOtpSecretCreatedTime
string<date-time>

Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer.

phone
string

Should be a valid E.164 compliant phone number. Could be empty.

profile
object

User profile metadata.

groups
string[]

The groups for the user. Format: groups/{email}

workloadIdentityConfig
object

Workload Identity configuration (only for WORKLOAD_IDENTITY type)