auth

Send magic link

Sends a one-time magic link to the given email for the project. The user clicks the link and is authenticated without a password. Use verify endpoint with the token from the link. Public endpoint; rate limited.

POST/api/auth/magic-link/send

Authentication

Public — No Auth Required

Request Body

Email, projectId, and optional redirect URL for the magic link.

json
{
  "email": "amari_koss69@northwind.dev",
  "projectId": "proj_qh5hFHNT70YZ",
  "redirectUrl": "https://youthful-conservative.net/"
}
{
  "email": "amari_koss69@northwind.dev",
  "projectId": "proj_qh5hFHNT70YZ",
  "redirectUrl": "https://youthful-conservative.net/"
}

SDK setup

Create a client instance. No authentication is required for this endpoint.

import { MudbaseClient } from "mudbase";

const client = new MudbaseClient();
import { MudbaseClient } from "mudbase";

const client = new MudbaseClient();

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const result = await client.auth.sendMagicLink({
  email: "jodie44@northwind.dev",
  projectId: "proj_tYpCa9HhTtR9",
  redirectUrl: "https://quiet-molasses.net"
});
const result = await client.auth.sendMagicLink({
  email: "jodie44@northwind.dev",
  projectId: "proj_tYpCa9HhTtR9",
  redirectUrl: "https://quiet-molasses.net"
});

Try It Live

Test this endpoint with your own credentials. Your requests will be sent to the live API.

No Request Yet

Send a request to see the full inspector

Responses

200Magic link sent
json
{
  "message": "Magic link sent successfully"
}
{
  "message": "Magic link sent successfully"
}
400Bad request or validation error.
401Authentication required or invalid token.
403Access denied or insufficient permissions.

Errors

CodeMeaning
400Bad request or validation error.
401Authentication required or invalid token.
403Access denied or insufficient permissions.
Edit this page on GitHub