startEmailUpdate

abstract suspend fun startEmailUpdate(request: IOrganizationsMemberStartEmailUpdateParameters): OrganizationsMemberStartEmailUpdateResponse

Initiates an email address update for the currently authenticated member by sending a verification link to the new address. Calls the POST /sdk/v1/b2b/organizations/members/start_email_update endpoint.

Kotlin:

StytchB2B.members.startEmailUpdate(
OrganizationsMemberStartEmailUpdateParameters(emailAddress = "newemail@example.com")
)

iOS:

let params = OrganizationsMemberStartEmailUpdateParameters(emailAddress: "newemail@example.com")
let response = try await StytchB2B.members.startEmailUpdate(params)

React Native:

StytchB2B.members.startEmailUpdate({ emailAddress: "newemail@example.com" })

Return

OrganizationsMemberStartEmailUpdateResponse confirming the verification was sent.

Parameters

request
  • IOrganizationsMemberStartEmailUpdateParameters

  • emailAddress — The new email address to update to.

  • loginRedirectUrl? — URL to redirect to after the email is verified.

  • locale? — Locale for the verification email.

  • loginTemplateId? — Custom email template ID.

  • deliveryMethod? — Delivery method for the verification (e.g. "magic_link", "otp").

Throws

StytchError

if the request fails.

if the coroutine is cancelled.