PUTDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Israel-Perez/Nuxt-Secure/llms.txt
Use this file to discover all available pages before exploring further.
/api/usuario/:id
Updates the fields of an existing user. The core text fields (strNombreUsuario, idPerfil, strCorreo, strNumeroCelular, idEstadoUsuario) are always overwritten. imagenUrl is only updated when a new imagenBase64 value is provided — omitting it leaves the existing photo URL unchanged. strPwd is only re-hashed and updated when a non-empty string is provided.
Path parameters
Primary key of the user to update.
Request body
Updated username.
Updated profile (role) ID.
Updated email address.
Updated phone number.
Updated active status.
true = active, false = inactive.New plain-text password. If this field is present and non-empty, it is hashed with bcrypt (10 rounds) and replaces the stored hash. Omit or send an empty string to leave the password unchanged.
Base64-encoded replacement image (must start with
data:image). When provided, a new image is uploaded to the usuarios_corp Cloudinary folder and imagenUrl is updated to the new secure URL. If omitted, the existing imagenUrl is not modified.Response
true when the update completes without error.The updated user record as returned by the database.
Error responses
| Status | Message | Cause |
|---|---|---|
500 | Error al actualizar: la imagen es demasiado grande o el servidor tardó demasiado. | Cloudinary upload failed, the image payload is too large, or the request timed out. |
The handler does not return a
404 if the id does not match any record — it will return success: true with data set to undefined. Validate the response data field on the client if you need to confirm the record existed.Examples
Success response
200