Send email verification
POST/company/users/send_verify
Send a verification email to the current user to activate their account.
Useful when the previous email expired or was not received.
Objective
Allow users to request a new verification email to complete their account activation process.
Use Cases
- User did not receive the original verification email
- The verification link has expired
- User wants to change their email and needs to verify the new one
Authentication
- Requires a valid JWT (middleware m.isLogged)
Process
- Generate a unique verification token using tools.generateToken()
- Save the token in user.recovery_token
- Send the email using mail.sendActive() in the user's language
- Return a confirmation of sending
Email Content
- Subject: Depends on the language (user.i18n)
- Body: Includes a link with the verification token
- Language: Uses the user's configured language (user.i18n)
Notes
- Does not validate if the email is already verified
- Overwrites any previous token
- The token is used in the auth verification endpoint
Error Messages
- NOT_VALID (401): Invalid or empty email
Request
Responses
- 200
- 401
- 404
Verification email sent successfully
Unauthorized or invalid email. Possible causes:
- Invalid or expired JWT token
- User email is invalid
User not found