updateEmailAddress()
Updates the given email address.
Returns the updated EmailAddress object.
function updateEmailAddress(emailAddressId: string, params: { primary?: boolean; verified?: boolean }): Promise<EmailAddress>- Name
emailAddressId- Type
string- Description
The ID of the email address to update.
- Name
params- Type
{ primary?: boolean; verified?: boolean; }- Description
The parameters to update the email address.
- Name
params.primary?- Type
boolean- Description
Whether the email address should be the primary email address. Defaults to
false, unless it is the first email address added to the user.
- Name
params.verified?- Type
boolean- Description
Whether the email address should be verified. Defaults to
false.
const emailAddressId = 'idn_123'
const params = { verified: false }
const response = await clerkClient.emailAddresses.updateEmailAddress(emailAddressId, params)Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint PATCH/email_addresses/{email_address_id}. See the BAPI reference for more information.
Feedback
Last updated on