API Docs
Need help?
Back to User Management

Update User

Updates an existing user's information.

Request Details

path Parameters

FieldTypeRequiredDescription
userId
string
YesThe unique identifier of the user to update.

body Parameters

FieldTypeRequiredDescription
id
string
YesUnique identifier for the user
name
string
YesFull name of the user
email
string
YesEmail address of the user
password
string
YesUser's password (write-only)
createdAt
string
date-time
NoTimestamp when the user was created
updatedAt
string
date-time
NoTimestamp when the user was last updated
lastLogin
string
date-time
NoTimestamp of the user's last login
settings
object
UserSettings
NoUser-specific settings. See UserSettings schema.

Sample Request & Response

PUT
/users/{userId}
Updates an existing user's information.
Sample Request

Headers:

{
  "Content-Type": "application/json",
  "Authorization": "Bearer <YOUR_AUTH_TOKEN>"
}

Path Parameters:

{
  "userId": "string (required) - The unique identifier of the user to update."
}

Body:

{
  "name": "Jane Doe",
  "email": "jane.doe@example.com",
  "settings": {
    "notificationsEnabled": false
  }
}
Sample Response (200)
{
  "id": "usr_abc123xyz",
  "name": "Jane Doe",
  "email": "jane.doe@example.com",
  "updatedAt": "2024-07-24T12:00:00Z",
  "settings": {
    "notificationsEnabled": false,
    "theme": "dark"
  }
}