Skip to main content

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

  1. Generate a unique verification token using tools.generateToken()
  2. Save the token in user.recovery_token
  3. Send the email using mail.sendActive() in the user's language
  4. 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

Verification email sent successfully