The registration endpoint creates a new Urban Store user account and immediately triggers an email containing a 6-digit verification code. The account is set toDocumentation 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.
is_verified=False at creation time, meaning the user cannot log in until they complete the email verification step. Passwords are hashed with bcrypt before being stored — plain-text passwords are never persisted.
Endpoint
Authentication
None required. This endpoint is publicly accessible.Request Body
A valid, unique email address. Returns a
400 validation error if the address is already registered in the system.The user’s chosen password. Must be at least 6 characters long. Stored as a bcrypt hash — the plain-text value is never persisted.
The user’s first name. Maximum 100 characters.
The user’s last name. Maximum 100 characters.
Request Example
Response — 201 Created
A successful registration returns HTTP201 with the confirmation message and the registered email address.
Human-readable confirmation that the user was created and that a verification email has been dispatched.
The email address the verification code was sent to.
What Happens After Registration
Once the record is saved, the API:- Generates a cryptographically random 6-digit numeric code (
random.randint(100000, 999999)). - Stores the code in
verification_tokenand setsverification_token_expiresto 24 hours from now (UTC). - Records
last_verification_sent_atand resetsverification_attemptsto0. - Sends a styled HTML email to the registered address with the code prominently displayed.
Error Responses
| Status | Body | Cause |
|---|---|---|
400 | { "email": ["Este email ya está registrado"] } | Email already exists in the database |
400 | { "password": ["Ensure this field has at least 6 characters."] } | Password shorter than 6 characters |
400 | { "email": ["Enter a valid email address."] } | Malformed email format |
400 | { "first_name": [...] } | first_name missing or exceeds 100 chars |
400 | { "last_name": [...] } | last_name missing or exceeds 100 chars |
A newly registered account cannot log in until the email is verified. To complete verification, call
POST /api/users/verify-code/ with the email and the 6-digit code from the email. If the code has expired or was lost, use POST /api/users/resend-verification/ to request a new one.