The identifier of the user.
PATCH
/admin/v1/users/{userId}Update a user
Updates specified user.
query parameters
body parameters
Returns
curl https://api.userhub.com/admin/v1/users/usr_MKFxzgJaAH8JQ4 \
-H "Authorization: Bearer $ADMIN_API_KEY" \
-X PATCH \
--json '{
"uniqueId": "jane",
"displayName": "Jane Smith"
}'
const res = await adminApi.users.update(
"usr_MKFxzgJaAH8JQ4",
{
displayName: "Jane Smith",
uniqueId: "jane",
},
);
res, err := adminApi.Users().Update(
context.Background(),
"usr_MKFxzgJaAH8JQ4",
&adminapi.UserUpdateInput{
DisplayName: "Jane Smith",
UniqueId: "jane",
},
)
$res = $adminApi->users->update(
userId: 'usr_MKFxzgJaAH8JQ4',
displayName: 'Jane Smith',
uniqueId: 'jane',
);
res = admin_api.users.update(
user_id="usr_MKFxzgJaAH8JQ4",
display_name="Jane Smith",
unique_id="jane",
)
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": "New York",
"postalCode": "11222",
"country": "US"
},
"accountConnections": [],
"subscription": null,
"memberships": [],
"signupTime": "2024-06-15T13:00:00Z",
"createTime": "2024-06-15T13:00:00Z",
"updateTime": "2024-06-15T13:00:00Z"
}