Send Login Code Email - issues a one-time code or login link via email.
Use with an AI agent
Export this page as Markdown or bundle it with a task for your agent.
Try a task
Preview the prompt that will be copied
Reference
Authentication: not required
Send Login Code Email - issues a one-time code or login link via email.
This method mirrors the functionality of the GraphQL resolver send_login_code_email.
It generates a login code for the specified email, persists its metadata, and sends
an email using the configured mail driver (fake or SES SMTP).
Authentication: Not required
Parameters:
- email (string, required): Recipient email address
- loginCodeType (string, required): SHORT_LIVED (code) or LONG_LIVED (link)
- emailType (string, required): LOGIN_CODE or WEB_LOGIN_LINK
Constraints:
- WEB_LOGIN_LINK requires LONG_LIVED
- LOGIN_CODE requires SHORT_LIVED
- Resend rate limited to once per 60 seconds per email
- Requests are also rate limited per client IP and per email
- The response is the same whether or not the email already has an account
Returns:
- { message: "ok", loginUrl?: string }
To sign in with a 6-digit code, use loginCodeType SHORT_LIVED with emailType
LOGIN_CODE, then exchange the code with loginByEmailVerification.
Example:
{
"method": "sendLoginCodeEmail",
"params": {
"email": "YOUR_EMAIL_ADDRESS",
"loginCodeType": "SHORT_LIVED",
"emailType": "LOGIN_CODE"
}
}