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

PATCH /v1/users/{user_id}

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

{
  "name": "Jane A. Doe",
  "status": "suspended",
  "password": "new_secure_password"
}

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)

{
  "id": "user_123",
  "email": "user@example.com",
  "name": "Jane A. Doe",
  "status": "suspended",
  "created_at": "2024-09-18T10:15:00Z",
  "updated_at": "2025-09-18T19:50:00Z"
}

Field

Type

Description

id

string

User’s unique ID.

email

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": "invalid_request",
  "message": "The provided status value is not valid."
}

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

curl -X PATCH "https://api.example.com/v1/users/user_123" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer admin_access_token" \
  -d '{
    "name": "Jane A. Doe",
    "status": "suspended"
  }'

JavaScript (Fetch)

const response = await fetch("https://api.example.com/v1/users/user_123", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer admin_access_token"
  },
  body: JSON.stringify({
    name: "Jane A. Doe",
    status: "suspended"
  })
});

const data = await response.json();
console.log(data.updated_at);

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.

Need help? Contact Support

Questions? Contact Sales

On this page

Create a free website with Framer, the website builder loved by startups, designers and agencies.