Update a user.
Update a user
PATCH
/admin/v1/users/{userId}query parameters
body parameters
Returns
curl https://api.userhub.com/admin/v1/users/usr_MKFxzgJaAH8JQ4 \
-H "Authorization: Bearer $USERHUB_ADMIN_KEY" \
-X PATCH \
--json '{
"uniqueId": "jane",
"displayName": "Jane Smith"
}'
const res = await adminApi.users.update(
"usr_MKFxzgJaAH8JQ4",
{
uniqueId: "jane",
displayName: "Jane Smith",
},
);
res, err := adminApi.Users().Update(
context.Background(),
"usr_MKFxzgJaAH8JQ4",
&adminapi.UserUpdateInput{
UniqueId: adminapi.Some[string]("jane"),
DisplayName: adminapi.Some[string]("Jane Smith"),
},
)
$res = $adminApi->users->update(
userId: 'usr_MKFxzgJaAH8JQ4',
uniqueId: 'jane',
displayName: 'Jane Smith',
);
res = admin_api.users.update(
user_id="usr_MKFxzgJaAH8JQ4",
unique_id="jane",
display_name="Jane Smith",
)
Response bodyJSON
{
"id": "usr_MKFxzgJaAH8JQ4",
"state": "ACTIVE",
"uniqueId": "jane",
"displayName": "Jane Smith",
"email": "[email protected]",
"emailVerified": true,
"phoneNumber": "+12125550123",
"phoneNumberVerified": false,
"imageUrl": "https://example.com/jane.jpg",
"currencyCode": "USD",
"languageCode": "en",
"regionCode": "US",
"timeZone": "America/New_York",
"address": {
"lines": [
"42 West St"
],
"city": "Brooklyn",
"state": "NY",
"postalCode": "11222",
"country": "US"
},
"accountConnections": [],
"memberships": [],
"signupTime": "2025-05-15T13:00:00Z",
"view": "FULL",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
}