provider User PUT
/v1/users/{user_id}/exchange_primary_factor @utdk/stytch
/v1/users/{user_id}/exchange_primary_factor Exchangeprimaryfactor
Exchange a user's email address or phone number for another.
Must pass either an `email_address` or a `phone_number`.
This endpoint only works if the user has exactly one factor. You are able to exchange the type of factor for another as well, i.e. exchange an `email_address` for a `phone_number`.
Use this endpoint with caution as it performs an admin level action.
- user_id path required
- The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
- string
Try it
Authentication
Configure credentials for Stytch API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import stytch from '@utdk/stytch';
await stytch.apiUserV1Exchangeprimaryfactor()