Skip to main content
Relinking a Linked Account

Guidance on setting up a relinking flow via API and Magic Link

Updated over 10 months ago

Relink an Account within your Product

When one of your customers goes through the Merge Linking Flow for the first time, an end_user_origin_id should be created for that organization. You should store that value in your backend, so that when the customer comes back to the linking flow to update their credentials, you can initiate the relinking flow, rather than create a completely new Linked Account.

You can also use our API to programmatically determine if an integration between Merge and customer requires "Re-link" by using the status field from the Linked Accounts endpoint!


Relink an Account using API (Send Link via API)

To relink an account, and to prevent creating a new one, you will need to pass the existing account's end_user_origin_id to the /link-token endpoint. That way when the existing end user opens Merge Link and a new link token is generated, Merge will recognize them and ask for updated credentials to their account instead of setting up a new account.


Relink an Account using Magic Link (Send Link via URL)

You can initiate a relinking flow through Magic Link! This can be done in two ways:

  • To programmatically generate Magic Link URLs via API, make a POST request to the /link-token endpoint, and in the body parameters of your POST request, set the should_create_magic_link_url parameter to true. You can find more information in our docs here!

  • You can also generate the Magic Link from directly within the Merge Dashboard! Navigate to your Production Linked Accounts page and selected the Linked Account you'd like reconnect. Inside of the Linked Account's page, select the Relink with Magic Link button. A pre-filled Magic Link generation modal will appear, allowing you to generate a Magic Link URL for relinking!

Did this answer your question?