Overview
This endpoint allows users to request a new verification email if their previous token has expired or was lost. Supports both JWT authentication (for logged-in users) and traditional request body authentication. The API includes rate limiting and validation to prevent abuse.
API Details
Authentication Methods
Method 1: JWT Authentication (Recommended)
Bearer JWT token for authenticated users
Optional custom verification path for email verification
Method 2: Traditional Authentication
Email address to resend verification to
Required for child accounts when using traditional authentication
Optional custom verification path for email verification
cURL - JWT Authentication
cURL - Traditional Authentication
JavaScript - JWT Authentication
JavaScript - Traditional Authentication
Python
curl -X POST https://api.authiqa.com/auth/request-new-confirmation \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"verifyAuthPath": "/custom-verify"
}'
Try It Out
Test the API using either JWT or traditional authentication:
JWT token for authenticated users
Custom verification path (optional)
Email address to receive verification link
Parent public key (required for child accounts)
Custom verification path (optional)
Process Flow
Authentication Detection
Check for JWT token in Authorization header
If JWT present, verify and extract user information
If no JWT, use traditional request body authentication
User Resolution
JWT flow: Get user by decoded token information
Traditional flow: Get user by email and optional parent public key
Validate user exists and account requirements
Validation Checks
Verify email is not already verified
Check account type specific requirements
Validate rate limiting (1-minute cooldown)
Check parent account status (for child accounts)
Token Generation & Email
Generate new 12-character verification token
Update verification token in database
Send verification email with appropriate branding
Support custom verification paths
Authentication Flows
JWT Authentication Flow
User provides JWT token in Authorization header
System verifies token and extracts user information
User information used to send verification email
Optional custom verification path supported
Traditional Authentication Flow
User provides email in request body
For child accounts, parent public key required
System validates user and parent relationship
Verification email sent with organization branding
Response Examples
{
"success" : true ,
"data" : {
"message" : "A new verification link has been sent to your email"
}
}
{
"success" : false ,
"error" : {
"code" : "INVALID_EMAIL_FORMAT" ,
"message" : "Invalid email format"
}
}
{
"success" : false ,
"error" : {
"code" : "RATE_LIMIT_EXCEEDED" ,
"message" : "Please wait 45 seconds before requesting a new verification link"
},
"headers" : {
"X-RateLimit-Limit" : "1" ,
"X-RateLimit-Remaining" : "0" ,
"X-RateLimit-Reset" : "1729616234"
}
}
Error Codes
MISSING_REQUEST_BODY - Request body required (traditional auth)
INVALID_REQUEST_BODY - Invalid JSON format
MISSING_REQUIRED_FIELDS - Email field required (traditional auth)
INVALID_EMAIL_FORMAT - Invalid email format
EMAIL_ALREADY_VERIFIED - Email already verified
MISSING_PARENT_PUBLIC_KEY - Parent public key required for child accounts
INVALID_PARENT_PUBLIC_KEY_FORMAT - Invalid public key format
INVALID_REQUEST - Parent public key should not be provided for parent accounts
INVALID_PARENT_PUBLIC_KEY - Invalid parent public key
PARENT_ACCOUNT_INACTIVE - Parent account has insufficient balance
USER_NOT_FOUND - No account with provided information
RATE_LIMIT_EXCEEDED - Wait before requesting again
500 Internal Server Error
INTERNAL_ERROR - Unexpected server error occurred
Rate Limiting
Rate Limits
1 request per minute per email
Rate limit headers included in response:
X-RateLimit-Limit: 1
X-RateLimit-Remaining: 0
X-RateLimit-Reset: < timestam p >
Cooldown period: 60 seconds
Email verification links expire after 15 minutes. Users should request a new link if the original expires.