Users
Update user details
Modify profile information for an existing user.
The Update User endpoint allows you to modify specific details of an existing user without replacing the entire object. Only the fields included in the request body will be updated.
Endpoint
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
user_id | string | Yes | The unique identifier of the user to update. |
Headers
Key | Value | Required |
---|---|---|
Content-Type | application/json | Yes |
Authorization | Bearer <access_token> | Yes |
Request Body
Field | Type | Required | Description |
---|---|---|---|
name | string | No | Full name of the user. |
status | string | No | Account status (active, suspended, pending). |
password | string | No | New password for the user. Must follow security requirements. |
Response
Successful Response (200 OK)
Field | Type | Description |
---|---|---|
id | string | User’s unique ID. |
string | User’s email address. | |
name | string | Updated name. |
status | string | Updated account status. |
created_at | string | Timestamp when the user was created. |
updated_at | string | Timestamp when the user was last updated. |
Error Response (400 / 401 / 404)
Error Code | Meaning |
---|---|
invalid_request | Malformed request body or invalid field values. |
unauthorized | Missing or invalid access token. |
not_found | User with the given ID does not exist. |
Example Usage
cURL
JavaScript (Fetch)
Use PATCH for partial updates. To replace a user object entirely, use PUT (if supported). Always validate user input before updating sensitive fields like password or status.