Skip to main content
POST
/
v0
/
auth
/
magic-link
Generate a Magic Link
curl --request POST \
  --url https://api.sandbox.getasset.com/v0/auth/magic-link \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "business_id": "<string>",
  "external_business_id": "<string>",
  "ttl": 5,
  "session_timeout": 86400,
  "email": "jsmith@example.com",
  "path": "/reports"
}
'
{
  "data": {
    "magic_link": "<string>",
    "magic_link_id": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.getasset.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
business_id
string<biz_string> | null

The id of the business in the Asset platform. Either this or external_business_id must be provided.

external_business_id
string | null

The id of the business in the tenant platform. Either this or business_id must be provided.

ttl
integer
default:5

The tokens' time to live in minutes. Default is 5 minutes, max is 15.

Required range: 1 <= x <= 15
session_timeout
integer
default:86400

The session timeout in seconds. Default is 86400 seconds (1 day), max is 2592000 (30 days).

Required range: 1 <= x <= 7948800
email
string<email>

The user email to associate with this magic link

path
string | null

The path to append to the magic link route

Example:

"/reports"

Response

Successful Response

data
MagicLinkResponse · object
required