startEmailUpdate

abstract suspend fun startEmailUpdate(memberId: String, request: IOrganizationsAdminMemberStartEmailUpdateParameters): OrganizationsAdminMemberStartEmailUpdateResponse

Initiates an email address update for the specified member by sending a verification link to the new address. Calls the POST /sdk/v1/b2b/organizations/members/{member_id}/start_email_update endpoint. Requires an active session and appropriate RBAC permissions.

Kotlin:

StytchB2B.members.admin.startEmailUpdate(
memberId = "member-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
request = OrganizationsAdminMemberStartEmailUpdateParameters(emailAddress = "newemail@example.com"),
)

iOS:

let params = OrganizationsAdminMemberStartEmailUpdateParameters(emailAddress: "newemail@example.com")
let response = try await StytchB2B.members.admin.startEmailUpdate(
memberId: "member-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
request: params
)

React Native:

StytchB2B.members.admin.startEmailUpdate(
"member-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
{ emailAddress: "newemail@example.com" }
)

Return

OrganizationsAdminMemberStartEmailUpdateResponse confirming the verification was sent.

Parameters

memberId

The unique ID of the member whose email to update.

request
  • IOrganizationsAdminMemberStartEmailUpdateParameters

  • emailAddress — The new email address to update to.

  • loginRedirectUrl? — URL to redirect to after verification.

  • 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 or the caller lacks permission.

if the coroutine is cancelled.