provider Email POST /v1/b2b/magic_links/email/discovery/send
@utdk/stytch /v1/b2b/magic_links/email/discovery/send
Send
Send a discovery magic link to an email address. The magic link is valid for 60 minutes.

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.

apiB2bMagicV1B2bMagicLinksEmailDiscoverySend
POST/v1/b2b/magic_links/email/discovery/send
Send a discovery magic link to an email address. The magic link is valid for 60 minutes.

Input

required

The email address of the Member.

The URL that the end user clicks from the discovery Magic Link. This URL should be an endpoint in the backend server that verifies the request by querying Stytch's discovery authenticate endpoint and continues the flow. If this value is not passed, the default discovery redirect URL that you set in your Dashboard is used. If you have not set a default discovery redirect URL, an error is returned.

A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.

Use a custom template for discovery emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”.

The expiration time, in minutes, for an discovery magic link email. If not accepted within this time frame, the email will need to be resent. Defaults to 60 (1 hour) with a minimum of 5 and a maximum of 10080 (1 week).

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import stytch from '@utdk/stytch';

await stytch.apiB2bMagicV1B2bMagicLinksEmailDiscoverySend()