Skip to content

Email and account security ​

These endpoints handle email verification and password recovery. Within /api/email/*, only the resend endpoint requires authentication.

Email verification ​

POST /api/email/verify ​

Verifies an email address using the token from the verification message. Tokens are single-use and valid for 24 hours.

ParameterTypeRequired
tokenstringYes

An invalid or expired link returns 400 invalid_token. Request a new verification email.

POST /api/email/resend ​

Resends the verification email. Requires a session token. An already verified address returns 400 already_verified.

Password recovery ​

POST /api/email/forgot ​

Requests a password reset.

ParameterTypeRequired
emailstringYes
json
{ "ok": true, "message": "如果该邮箱已注册,我们已发出重置链接" }

The response is identical whether or not the address is registered, preventing account enumeration. Reset tokens are valid for 30 minutes.

POST /api/email/reset ​

Sets a new password using a reset token.

ParameterTypeRequiredDescription
tokenstringYesPassword reset token
passwordstringYes8–72 characters, including letters and digits

After a successful reset, all existing sessions are invalidated immediately. Sign in again with the new password.

Mail transport ​

GET /api/mail/status ​

Returns the active mail transport.

json
{ "ok": true, "transport": "smtp", "smtpConfigured": true, "baseUrl": "https://modelfold.ai" }
transportMeaning
smtpSMTP is configured; messages are delivered
fileSMTP is not configured; messages are written to a server log file as a fallback. Users do not receive these messages

POST /api/mail/test ​

Sends a test email to your own address or a specified recipient to verify SMTP configuration.

ParameterTypeRequired
tostringNo; defaults to your own address

Incorrect configuration returns 400 with the specific reason in the response.

See also ​

ModelFold — one API for all the best AI models.