Skip to main content

Endpoint

POST /api/auth/resend-verification-email
Request a new verification email to be sent to the user’s email address. Useful when the original verification token has expired or was not received.

Request Body

email
string
required
Email address to send the verification link to (must be a valid email format)

Response

Returns a success message regardless of whether the email exists to prevent email enumeration attacks.
message
string
Success message

Example Request

cURL
curl -X POST https://api.contafy.com/api/auth/resend-verification-email \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]"
  }'

Success Response

{
  "message": "Si el email existe, se ha enviado un nuevo correo de verificación"
}
For security reasons, this endpoint returns the same success message whether or not the email exists in the system. This prevents attackers from using it to enumerate registered email addresses.

Error Responses

400 Bad Request

{
  "error": "Error de validación",
  "details": [
    {
      "field": "email",
      "message": "Email inválido"
    }
  ]
}

500 Internal Server Error

{
  "error": "Error interno del servidor",
  "message": "Error al enviar el correo de verificación"
}

Important Notes

  • Verification tokens expire after 24 hours
  • The verification email contains a link with the token
  • Users must click the link and verify their email before accessing most API features
  • Already verified emails will not receive a new verification email
  • There is no rate limit on this endpoint to ensure users can always request a new verification email

Email Contents

The verification email contains:
  • A verification link valid for 24 hours
  • Instructions on how to verify the email
  • Link format: {APP_URL}/verify-email?token={verificationToken}
  • Verify Email - Verify email with token
  • Register - Create new account (sends initial verification email)

Build docs developers (and LLMs) love