# Magic Links API



> The magic links resource lets external tools create and maintain subscriber action links. This guide explains where to use magic links, how to match each action with the correct destination, and how to test links before live campaigns.



- Human page: https://mailrith.com/developers/magic-links

- Markdown page: https://mailrith.com/developers/magic-links.md

- Category: API Resources

- Reading time: 6 min read

- Last updated: 2026-06-13

- Related keywords: Magic Links API, Magic Links API developer docs, API Resources, API Resources developer docs, Mailrith developer docs, Mailrith public API, Manage Subscriber Action Links, Endpoint Overview, Magic Link Safety, Automations API, Tags API, API Reference



## AI Agent Notes

- Use this page as implementation guidance, then validate exact endpoint fields against the OpenAPI document.

- Keep API keys server-side and workspace-scoped unless a guide explicitly says otherwise.

- Do not invent privacy, consent, or lawful-basis evidence. Send only fields that appear in the OpenAPI schema for the endpoint you are using.



## What this guide covers

Create and maintain email links that perform clear subscriber actions when clicked.



## Manage Subscriber Action Links

Magic links turn a subscriber click into a controlled Mailrith action. A magic link can apply a tag, move a subscriber into a flow, or send the subscriber to a specific destination after Mailrith runs the action.

Use the magic links API when an external campaign builder, migration tool, or integration needs to create and manage subscriber action links without creating those links manually in the app.

Place magic links inside Mailrith emails so Mailrith can identify the subscriber who clicked. Do not use magic links as general public links for anonymous website visitors.

1. Before you create the magic link, create the tag, sequence, or destination resource that the link will use.
2. Create one magic link for one specific subscriber action.
3. If the external campaign builder needs to insert the link later, store the returned magic link ID and public URL in that system.
4. Place the public URL inside a Mailrith email. Do not place the public URL on an anonymous public page.
5. Send a test email to a test subscriber, then click the link from that email.
6. Confirm that the subscriber action appears in [Subscribers](https://mailrith.com/docs/subscribers.md) activity history and that the click appears in [Magic Links](https://mailrith.com/docs/magic-links.md) reporting.

- Create one magic link for one specific subscriber action.
- Name each link so users can tell what will happen when a subscriber clicks.
- Make sure destination URLs and subscriber actions match the campaign copy.
- Test a link from a real test email before you use the link in a live campaign.

## Endpoint Overview

`GET /v1/magic-links` lists magic link records. Item endpoints let integrations inspect, update, or delete one magic link.

`POST /v1/magic-links` creates a link definition. After you create a magic link, place its public URL inside a Mailrith email. Mailrith runs the action when the subscriber clicks that URL from a tracked email context.

Use the API reference to see the exact action and destination fields. If a link applies a tag or starts a sequence, confirm that the target tag or sequence exists in the same workspace before you create or use the link.

Related OpenAPI operation groups:
- Magic Links

## Magic Link Safety

Because a click can change subscriber state, make magic links easy to understand and audit. A confusing link name or a destination that does not match the action makes campaign review harder.

When you migrate links from another system, confirm both parts of the behavior: the action Mailrith performs on the subscriber and the destination where the subscriber lands after the click.

- Use test subscribers before you send a campaign with a new magic link.
- Do not reuse one magic link for unrelated actions.
- Keep old links available while subscribers may still click old emails, unless you intentionally want the action to stop working.
- Document links created by external systems so users know which system created each link.



## Related Guides

- [Automations API](https://mailrith.com/developers/automations.md): The automations resource exposes Mailrith workflow definitions for tools that create or synchronize automations outside the app. This guide explains what automations can affect, how to use the public schema, and what to review before you trust a generated workflow.

- [Tags API](https://mailrith.com/developers/tags.md): The tags API gives integrations a lightweight way to manage subscriber labels. This guide explains when to use tags, when to use custom fields instead, how to list or create tags, and how to name tags so workspace users understand each label.

- [API Reference](https://mailrith.com/developers/api-reference.md): The full API reference is generated from the same public contract used by the API worker and SDK tooling. Use the API reference to find exact paths, methods, parameters, request schemas, response schemas, operation IDs, and the downloadable OpenAPI document.
