Skip to main content
POST
/
api
/
auth
/
verify-email
Verify Email
curl --request POST \
  --url https://api.example.com/api/auth/verify-email \
  --header 'Content-Type: application/json' \
  --data '
{
  "token": "<string>"
}
'
{
  "message": "<string>",
  "error": "<string>"
}
Verifies a user’s email address using the token sent to their email during registration. This endpoint confirms that the user has access to the email address they provided.

Authentication

No authentication required.

Request Body

token
string
required
Email verification token sent to the user’s email address. This token is typically included in the verification link.

Response

message
string
Success message confirming email verification.

Example Request

curl -X POST https://api.contafy.com/api/auth/verify-email \
  -H "Content-Type: application/json" \
  -d '{
    "token": "evt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
  }'

Example Response

{
  "message": "Email verificado exitosamente"
}

Error Responses

error
string
Error type identifier.
message
string
Human-readable error message.

Common Errors

400 Bad Request
{
  "error": "INVALID_TOKEN",
  "message": "El token de verificación es inválido o ha expirado"
}
400 Bad Request
{
  "error": "VALIDATION_ERROR",
  "message": "Token es requerido"
}
400 Bad Request
{
  "error": "ALREADY_VERIFIED",
  "message": "Este email ya ha sido verificado"
}

Notes

  • Verification tokens typically expire after 24 hours
  • Users can request a new verification email if their token expires
  • Once verified, the user’s email_verified field will be set to true
  • Some features may be restricted until email verification is complete