Skip to main content
PUT
/
users
curl -X PUT https://api.falconalert.com/users \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Doe",
    "email": "jane.doe@example.com"
  }'
{
  "id": "1",
  "email": "jane.doe@example.com",
  "name": "Jane Doe",
  "username": "janedoe_123",
  "password": "55e1ebd3ebe4f1b46a5ccc9866d",
  "salt": "432423",
  "image_path": "profile-pictures/default.jpg",
  "role_id": 1,
  "created_at": "2025-09-25T12:14:44.000Z",
  "updated_at": "2025-10-24T02:30:15.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/4rt21/backend-proyecto/llms.txt

Use this file to discover all available pages before exploring further.

Authentication

This endpoint requires a valid JWT Bearer token. The update applies to the authenticated user’s profile.
Authorization
string
required
Bearer token for authenticationFormat: Bearer <your_access_token>

Request Body

All fields are optional. Include only the fields you want to update.
email
string
User’s email addressMust be a valid email format and unique across all users.Example: user@example.com
name
string
User’s full nameExample: John Doe
username
string
User’s unique usernameExample: johndoe
image_path
string
Path to user’s profile imageExample: /path/to/image.jpg

Response

id
string
Unique user identifier
email
string
Updated email address
name
string
Updated full name
username
string
Updated username
password
string
Hashed password (unchanged)
salt
string
Password salt (unchanged)
image_path
string
Updated profile image path
role_id
number
User’s role identifier (unchanged)
created_at
string
Account creation timestamp (unchanged)
updated_at
string
Last update timestamp (reflects current update)
curl -X PUT https://api.falconalert.com/users \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Doe",
    "email": "jane.doe@example.com"
  }'
{
  "id": "1",
  "email": "jane.doe@example.com",
  "name": "Jane Doe",
  "username": "janedoe_123",
  "password": "55e1ebd3ebe4f1b46a5ccc9866d",
  "salt": "432423",
  "image_path": "profile-pictures/default.jpg",
  "role_id": 1,
  "created_at": "2025-09-25T12:14:44.000Z",
  "updated_at": "2025-10-24T02:30:15.000Z"
}

Error Responses

Status CodeDescription
400Bad Request - No fields provided to update
401Unauthorized - Invalid or missing JWT token
409Conflict - Email already exists for another user

Notes

  • At least one field must be provided in the request body
  • Email addresses must be unique across all users
  • The password cannot be updated via this endpoint (use the change password endpoint instead)
  • Only the authenticated user can update their own profile