For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
Get startedAPI referenceImplementation
Get startedAPI referenceImplementation
  • Authentication
    • Merge Link
    • Prompt guide for Merge Link
    • Magic Link
    • Single integration
  • Reading data
    • Syncing best practices
  • Supplemental data
    • Overview
    • Remote Data
    • Custom objects
  • Writing data
    • Overview
  • Platform and account metadata
    • Integration metadata
    • Linked Accounts
  • Testing
    • Testing Merge's Unified API via Postman
  • Specifications
    • Schema properties
    • Model Context Protocol (MCP)
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
On this page
  • Generating Magic Link URL
  • Dashboard
  • API
  • Accessing Account Tokens for Linked Accounts Created with Magic Link
  • Dashboard
  • Webhook
Authentication

Magic Link

Integrate your end users without any frontend code
Was this page helpful?
Previous

Implementing Merge Link with a coding agent

Next

Authorize single integration

Built with

Overview

Our Magic Link allows you to deliver an in-browser Link experience without requiring any frontend code.

The Magic Link experience is sent to your end users via a secure URL.

Benefits:

  • Fast proof of concept of Merge without making frontend changes to embed Link into your app
  • Your users can authorize integrations without logging into your app, enabling custom user journeys
Magic Link Preview

Generating Magic Link URL

A Magic Link instance can be generated in two ways:

  • From your Merge dashboard (basic)
  • Programmatically via API (advanced)

Dashboard

Merge Link demo in dashboard

You can initialize a Magic Link from the Merge Dashboard in four easy steps.

  1. Navigate to Linked Accounts in the left navigation
  2. Under Production Linked Accounts, click the button to Send Link via URL
  3. Enter your end user’s information and the integration categories you want to make available to them
  4. Click Generate URL

That’s it! You will be presented with a unique URL that you can send to your customer.

The URL will expire within 7 days

API

Merge also offers the ability to programmatically generate Magic Link URLs via API.

To do this, make a POST request to the /link-token endpoint.

In the body parameters of your POST request, set the should_create_magic_link_url parameter to true.

In your POST request, we recommend setting the link_expiry_mins body parameter to the maximum of 10080 so that the Magic Link URL expires after 7 days. If this parameter is not explicitly set, the generated Magic Link URL will expire 30 minutes after creation.


Accessing Account Tokens for Linked Accounts Created with Magic Link

Once your customer has successfully integrated their third-party platform through Magic Link, you will need the new Linked Account’s account token to make API requests to Merge on behalf of that Linked Account.

You are able to access the account tokens of Linked Accounts created through Magic Link in one of two ways:

  • From your Merge Dashboard (basic)
  • Programmatically via Merge Webhook (advanced)

Dashboard

You can access the account token of a Product Linked Account directly in the Merge Dashboard with the following steps.

  1. Navigate to Linked Accounts in the left navigation
  2. Under “Production Linked Accounts”, select a Linked Account to go to its overview
  3. In the overview screen, the account token is in the bottom right

Account tokens are only visible to users with the Admin role.

Webhook

You can also receive the account token of a new Production Linked Account as soon as a connection is created by setting up a Linked Account linked webhook in your Merge Dashboard.

This webhook will notify you in real time when a Production Linked Account is created, indicated by is_relink returning false and the payload will contain the new Linked Account’s account token.

1{
2 "account_token": "xxxxxxxxxxxxxxxxxxxxx",
3 "category": "hris",
4 "company": "Test Company",
5 "integration": {
6 "name": "BambooHR",
7 "categories": ["hris"],
8 "image": "https://example.com/image.png",
9 "square_image": "https://example.com/square_image.png",
10 "color": "#5B4FC6",
11 "slug": "bamboohr",
12 "is_in_beta": false,
13 "api_endpoints_to_documentation_urls": {}
14 },
15 "is_duplicate": false,
16 "is_relink": false,
17 "end_user_email_address": "user@example.com",
18 "end_user_organization_name": "Test Org",
19 "end_user_origin_id": "test-user-123"
20}

To learn more about Merge Webhooks, view our Webhooks guide.