Skip to main content

View User Details

curl -X GET https://api.beanquick.com/api/admin/usuarios/1 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
{
  "id": 1,
  "name": "John Doe",
  "email": "[email protected]",
  "rol": "cliente",
  "created_at": "2026-01-15T10:30:00.000000Z",
  "updated_at": "2026-01-15T10:30:00.000000Z"
}
id
integer
required
The ID of the user to retrieve
id
integer
User ID
name
string
User’s full name
email
string
User’s email address
rol
string
User role: admin or cliente
created_at
string
Account creation timestamp
updated_at
string
Last update timestamp

Update User

curl -X PUT https://api.beanquick.com/api/admin/usuarios/1 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Smith",
    "email": "[email protected]",
    "rol": "admin",
    "password": "newSecurePassword123"
  }'
{
  "message": "Usuario actualizado correctamente.",
  "usuario": {
    "id": 1,
    "name": "John Smith",
    "email": "[email protected]",
    "rol": "admin",
    "created_at": "2026-01-15T10:30:00.000000Z",
    "updated_at": "2026-03-05T11:45:00.000000Z"
  }
}
id
integer
required
The ID of the user to update
name
string
required
User’s full name (max 255 characters)
email
string
required
User’s email address (must be unique)
rol
string
required
User role: admin or cliente
password
string
New password (minimum 6 characters). Optional - only include to change password
message
string
Success message
usuario
object
Updated user object
The password field is optional. If provided, it must be at least 6 characters long and will be encrypted before storage. The email must be unique across all users except the current user being updated.

Delete User

curl -X DELETE https://api.beanquick.com/api/admin/usuarios/1 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"
{
  "message": "Usuario eliminado correctamente."
}
id
integer
required
The ID of the user to delete
message
string
Success or error message
error
string
Detailed error information (only present on error)
Administrators cannot delete their own account. This is a security measure to prevent accidental self-deletion. If an admin attempts to delete themselves, a 403 Forbidden response will be returned.
This operation permanently deletes the user account. Ensure you have proper backups and that the deletion is intentional.

Build docs developers (and LLMs) love