The profile endpoints let authenticated users read their account details, update their display name, change their password, and deactivate their account. All four operations require a valid JWT Bearer token in theDocumentation 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.
Authorization header. The DELETE method performs a soft delete — the record stays in the database with is_active set to False — no data is permanently removed.
GET /api/users/profile/
Retrieve the profile of the currently authenticated user.Authentication
Bearer <token> — JWT obtained from POST /api/users/login/.Request Example
Response — 200 OK
The user’s registered email address.
The user’s first name. Returns an empty string
"" if not set.The user’s last name. Returns an empty string
"" if not set.true if the account has admin privileges.ISO 8601 timestamp of when the account was created (UTC).
PUT /api/users/profile/
Update the authenticated user’sfirst_name and/or last_name.
Authentication
Bearer <token> — JWT obtained from POST /api/users/login/.Request Body
The new first name. Maximum 30 characters. Cannot be blank.
The new last name (optional). Maximum 30 characters. Pass an empty string to clear it.
Request Example
Response — 200 OK
Confirmation string:
"Perfil actualizado".The updated first name as saved to the database.
The updated last name as saved to the database.
PUT Error Responses
| Status | Body | Cause |
|---|---|---|
400 | { "error": "El nombre no puede estar vacío" } | first_name was provided but is blank after stripping whitespace |
400 | { "error": "El nombre no puede exceder los 30 caracteres" } | first_name exceeds 30 characters |
400 | { "error": "El apellido no puede exceder los 30 caracteres" } | last_name exceeds 30 characters |
DELETE /api/users/profile/
Soft-delete the authenticated user’s account by settingis_active to False. The document is not removed from MongoDB.
Authentication
Bearer <token> — JWT obtained from POST /api/users/login/.Request Example
Response — 200 OK
POST /api/users/change-password/
Change the password for the currently authenticated user. Requires the existing password for confirmation before accepting the new one.Authentication
Bearer <token> — JWT obtained from POST /api/users/login/.Request Body
The user’s current plain-text password. Validated against the stored bcrypt hash.
The desired new password. Must be at least 6 characters long. Stored as a new bcrypt hash.
Request Example
Response — 200 OK
Change Password Error Responses
| Status | Body | Cause |
|---|---|---|
400 | { "error": "Contraseña actual incorrecta" } | current_password does not match the stored bcrypt hash |
400 | { "error": "La nueva contraseña debe tener al menos 6 caracteres" } | new_password is fewer than 6 characters |
401 | { "error": "Token inválido" } | Missing, malformed, or expired JWT |
Common Error Responses
All profile endpoints share the following auth-level errors:| Status | Body | Cause |
|---|---|---|
401 | { "error": "Token inválido" } | Authorization header is missing, the token is malformed, or the token has expired |
404 | { "error": "Usuario no encontrado" } | The user_id in the JWT does not match an active user record (is_active=True) |