After registering, users receive a 6-digit verification code by email. These two endpoints handle the verification lifecycle: submitting the code to activate the account, and requesting a fresh code if the original expired or was not received. The verify endpoint enforces a 3-attempt limit with a 15-minute lockout after three consecutive failures to protect against brute-force guessing.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ALEJ4NDRO2025/urban-store/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/users/verify-code/
Submit the 6-digit code received by email to activate the account. On success the account’sis_verified flag is set to True and all verification fields are cleared.
Authentication
None required. This endpoint is publicly accessible.Request Body
The email address of the account to verify. Must match an existing, unverified user record.
The 6-digit numeric code that was emailed at registration (or after a resend). Example:
"847203".Rate Limiting
The endpoint tracks failed verification attempts per user:- A wrong code increments
verification_attemptsand recordslast_failed_attempt_at. - After 3 failed attempts, the account is locked for 15 minutes from the timestamp of the last failure.
- During the lockout window every request returns
429with the number of minutes remaining. - Once the 15-minute window passes, the attempt counter is automatically reset to
0on the next request.
Code Expiry
The code expires 24 hours after it was issued. Submitting an expired code returns400. A new code can be requested via POST /api/users/resend-verification/.
Request Example
Response — 200 OK
| Field | New Value |
|---|---|
is_verified | True |
verification_token | None |
verification_token_expires | None |
verification_attempts | 0 |
last_failed_attempt_at | None |
Error Responses
| Status | Body | Cause |
|---|---|---|
400 | { "error": "El código ha expirado. Solicita uno nuevo." } | The code’s verification_token_expires timestamp is in the past |
400 | { "error": "Código incorrecto. Te quedan N intentos." } | Code does not match; N is the number of remaining attempts before lockout |
429 | { "error": "Demasiados intentos fallidos. Intenta de nuevo en N minutos o solicita un nuevo código." } | 3 failed attempts recorded; N is minutes remaining in the 15-minute lockout |
404 | { "error": "Usuario no encontrado" } | No user record found for the provided email |
200 | { "message": "La cuenta ya está verificada" } | The account’s is_verified is already True — no action taken |
POST /api/users/resend-verification/
Request a new 6-digit verification code for an unverified account. Use this when the original code has expired, was never received, or if the account is locked out from too many failed attempts.Authentication
None required. This endpoint is publicly accessible.Request Body
The email address associated with the unverified account.
Cooldown
To prevent email spam, there is a 2-minute cooldown between resend requests, tracked vialast_verification_sent_at. If a request arrives before the cooldown has elapsed, the API returns 429 with the exact number of seconds the caller must wait.
What the Resend Does
When a new code is issued the following fields are updated on the user record:| Field | New Value |
|---|---|
verification_token | New 6-digit code |
verification_token_expires | Now + 24 hours (UTC) |
last_verification_sent_at | Now (UTC) |
verification_attempts | 0 |
last_failed_attempt_at | None |
verification_attempts and last_failed_attempt_at clears any active lockout, allowing the user to immediately attempt verification with the new code.
Request Example
Response — 200 OK
Error Responses
| Status | Body | Cause |
|---|---|---|
429 | { "error": "Debes esperar N segundos antes de solicitar otro código." } | Resend requested within the 2-minute cooldown window; N is the exact seconds remaining |
200 | { "message": "La cuenta ya está verificada" } | The account’s is_verified is already True — no new code is sent |
200 | { "message": "Si el email está registrado y no verificado, recibirás un nuevo código" } | Email not found in the database — a generic response is returned to prevent user enumeration |
The resend endpoint does not return an error when the email is not found. Instead it returns a generic
200 success message. This is intentional security behavior to prevent exposing whether a given email is registered.